Interface ISerializer
A low-level abstraction over a JSON serializer/deserializer.
Namespace: Okta.Sdk.Internal
Assembly: Okta.Sdk.dll
Syntax
public interface ISerializer
Methods
Deserialize(String)
Deserializes the given JSON string to a .NET dictionary.
Declaration
IDictionary<string, object> Deserialize(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The JSON to deserialize. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | A .NET dictionary containing the keys and values in the JSON object. |
DeserializeArray(String)
Deserializes the given JSON string to an array of .NET dictionaries.
Declaration
IEnumerable<IDictionary<string, object>> DeserializeArray(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The JSON array to deserialize. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Collections.Generic.IDictionary<System.String, System.Object>> | An array of .NET dictionaries containing the keys and values in each item of the JSON array. |
Serialize(Object)
Serializes the given object to a string.
Declaration
string Serialize(object model)
Parameters
Type | Name | Description |
---|---|---|
System.Object | model | The object to serialize. |
Returns
Type | Description |
---|---|
System.String | A JSON representation of |