Show / Hide Table of Contents

    Class JsonUtility

    Inheritance
    Object
    JsonUtility
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace:Microsoft.DocAsCode.Common
    Assembly:Microsoft.DocAsCode.Common.dll
    Syntax
    public static class JsonUtility

    Fields

    DefaultSerializer

    Declaration
    public static readonly ThreadLocal<JsonSerializer> DefaultSerializer
    Field Value
    Type Description
    ThreadLocal<Newtonsoft.Json.JsonSerializer>

    Methods

    Deserialize<T>(TextReader, JsonSerializer)

    Declaration
    public static T Deserialize<T>(TextReader reader, JsonSerializer serializer = null)
    Parameters
    Type Name Description
    TextReader reader
    Newtonsoft.Json.JsonSerializer serializer
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Deserialize<T>(String, JsonSerializer)

    Declaration
    public static T Deserialize<T>(string path, JsonSerializer serializer = null)
    Parameters
    Type Name Description
    String path
    Newtonsoft.Json.JsonSerializer serializer
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    FromJsonString<T>(String, JsonSerializer)

    Declaration
    public static T FromJsonString<T>(this string json, JsonSerializer serializer = null)
    Parameters
    Type Name Description
    String json
    Newtonsoft.Json.JsonSerializer serializer
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Serialize(TextWriter, Object, Formatting, JsonSerializer)

    Declaration
    public static void Serialize(TextWriter writer, object graph, Formatting formatting = Formatting.None, JsonSerializer serializer = null)
    Parameters
    Type Name Description
    TextWriter writer
    Object graph
    Newtonsoft.Json.Formatting formatting
    Newtonsoft.Json.JsonSerializer serializer

    Serialize(Object, Formatting, JsonSerializer)

    Declaration
    public static string Serialize(object graph, Formatting formatting = Formatting.None, JsonSerializer serializer = null)
    Parameters
    Type Name Description
    Object graph
    Newtonsoft.Json.Formatting formatting
    Newtonsoft.Json.JsonSerializer serializer
    Returns
    Type Description
    String

    Serialize(String, Object, Formatting, JsonSerializer)

    Declaration
    public static void Serialize(string path, object graph, Formatting formatting = Formatting.None, JsonSerializer serializer = null)
    Parameters
    Type Name Description
    String path
    Object graph
    Newtonsoft.Json.Formatting formatting
    Newtonsoft.Json.JsonSerializer serializer

    ToJsonString(Object, Formatting, JsonSerializer)

    Declaration
    public static string ToJsonString(this object graph, Formatting formatting = Formatting.None, JsonSerializer serializer = null)
    Parameters
    Type Name Description
    Object graph
    Newtonsoft.Json.Formatting formatting
    Newtonsoft.Json.JsonSerializer serializer
    Returns
    Type Description
    String
    Back to top Copyright © 2015-2017 Microsoft
    Generated by DocFX