GridSerializer.GetChangesFromJson<KeyType> method

Extracts a collection of Change objects from the passed-in JavaScript Object Notation (JSON).

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

Syntax

'Declaration
Public Shared Function GetChangesFromJson(Of KeyType) ( _
    json As String, _
    embeddedDataTypes As IEnumerable(Of Type), _
    builder As ObjectBuilderFromSerialized, _
    propTypeGenerator As CellPropTypeIdRetriever _
) As IList(Of Change)
'Usage
Dim json As String
Dim embeddedDataTypes As IEnumerable(Of Type)
Dim builder As ObjectBuilderFromSerialized
Dim propTypeGenerator As CellPropTypeIdRetriever
Dim returnValue As IList(Of Change)

returnValue = GridSerializer.GetChangesFromJson(json, _
    embeddedDataTypes, builder, propTypeGenerator)
public static IList<Change> GetChangesFromJson<KeyType>(
    string json,
    IEnumerable<Type> embeddedDataTypes,
    ObjectBuilderFromSerialized builder,
    CellPropTypeIdRetriever propTypeGenerator
)

Type parameters

  • KeyType
    The key type must correspond to the .Net type of the record keys.

Parameters

  • json
    Type: System.String

    A string formatted in JavaScript Object Notation (JSON), holding JavaScript representations of Change objects.

  • builder
    Type: Microsoft.SharePoint.JSGrid.ObjectBuilderFromSerialized

    Used when encountering serialized data in the JSON stream, a delegate to create an object of the appropriate C# type, given a localized string. For instance, this delegate might take the string “4” and return a Int32 with the value 4.

  • propTypeGenerator
    Type: Microsoft.SharePoint.JSGrid.CellPropTypeIdRetriever

    Used to determine the property type ID of any encountered property updates. This is a delegate that takes a string representing of a serialized record key and a string representing the field key, and returns a property type ID.

Return value

Type: System.Collections.Generic.IList<Change>
A IList<T> of changes.

See also

Reference

GridSerializer class

GridSerializer members

Microsoft.SharePoint.JSGrid namespace