TaxonomyField.RenderFieldValueAsJson method

SharePoint 2013

Renders the field value as a serialized JavaScript Object Notation (JSON) string.

Namespace:  Microsoft.SharePoint.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)

public override string RenderFieldValueAsJson(
	Object value
)

Parameters

value
Type: System.Object

Return value

Type: System.String
The field value in a serialized JSON format of the form (for single-value fields):
{"TermID": "guid", "Label": "label"}
or (for multivalued fields):
[{"TermID": "guid1", "Label": "label1"},
{"TermID": "guid2", "Label": "label2"}, ...]

The client-side rendering (CSR) framework calls the TaxonomyField.RenderFieldValueAsJson(System.Object) method to get the field value as a JSON object that the framework can serialize and send to the client.

Show: