API version:
Show / Hide Table of Contents

Class DefaultSerializer

The default implementation of ISerializer that uses JSON.NET.

Inheritance
System.Object
DefaultSerializer
Implements
ISerializer
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Okta.Sdk.Internal
Assembly: Okta.Sdk.dll
Syntax
public sealed class DefaultSerializer : ISerializer

Constructors

DefaultSerializer(JsonSerializerSettings)

Initializes a new instance of the DefaultSerializer class.

Declaration
public DefaultSerializer(JsonSerializerSettings settings = null)
Parameters
Type Name Description
Newtonsoft.Json.JsonSerializerSettings settings

settings to customize how JSON is serialized.

Methods

Deserialize(String)

Deserializes the given JSON string to a .NET dictionary.

Declaration
public 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
public 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
public string Serialize(object model)
Parameters
Type Name Description
System.Object model

The object to serialize.

Returns
Type Description
System.String

A JSON representation of model.

Implements

ISerializer
Back to top Copyright © 2021 Okta, Inc.
Generated with DocFx.