Show / Hide Table of Contents

    Class Serialization

    Represents data serialization utility.

    Namespace: PlayniteSDKData

    Inherited members

    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()

    Methods

    | Improve this Doc View Source

    AreObjectsEqual(object, object)

    Compares two objects using json serialization.

    Parameters
    Type Name Description
    object object1
    object object2
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    FromJson<T>(string)

    Deserialize an object from JSON string.

    Parameters
    Type Name Description
    string json
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    FromJsonFile<T>(string)

    Deserialize an object from a file containing JSON string.

    Parameters
    Type Name Description
    string filePath
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    FromJsonStream<T>(Stream)

    Deserialize an object from JSON data stream.

    Parameters
    Type Name Description
    System.IO.Stream stream
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    FromToml<T>(string)

    Deserialize an object from TOML string.

    Parameters
    Type Name Description
    string toml
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    FromTomlFile<T>(string)

    Deserialize an object from a file containing TOML string.

    Parameters
    Type Name Description
    string filePath
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    FromYaml<T>(string)

    Deserialize an object from YAML string.

    Parameters
    Type Name Description
    string yaml
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    FromYamlFile<T>(string)

    Deserialize an object from a file containing YAML string.

    Parameters
    Type Name Description
    string filePath
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetClone<T>(T)

    Creates clone of an object using json serialization.

    Parameters
    Type Name Description
    T source
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetClone<T, U>(T)

    Creates clone of an object using json serialization.

    Parameters
    Type Name Description
    T source
    Returns
    Type Description
    U
    Type Parameters
    Name Description
    T
    U
    | Improve this Doc View Source

    ToJson(object, bool)

    Serialize an object to JSON string.

    Parameters
    Type Name Description
    object obj
    bool formatted
    Returns
    Type Description
    string
    | Improve this Doc View Source

    ToJsonStream(object, Stream, bool)

    Serialize an object to JSON string written to a stream.

    Parameters
    Type Name Description
    object obj
    System.IO.Stream stream
    bool formatted
    | Improve this Doc View Source

    ToYaml(object)

    Serialize an object to YAML string.

    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    string
    | Improve this Doc View Source

    TryFromJson<T>(string, out T, out Exception)

    Tries to deserialize an object from JSON string.

    Parameters
    Type Name Description
    string json
    T content
    System.Exception error
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromJson<T>(string, out T)

    Tries to deserialize an object from JSON string.

    Parameters
    Type Name Description
    string json
    T content
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromJsonFile<T>(string, out T, out Exception)

    Tries to deserialize an object from JSON file.

    Parameters
    Type Name Description
    string filePath
    T content
    System.Exception error
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromJsonFile<T>(string, out T)

    Tries to deserialize an object from JSON file.

    Parameters
    Type Name Description
    string filePath
    T content
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromJsonStream<T>(Stream, out T, out Exception)

    Tries to deserialize an object from JSON data stream.

    Parameters
    Type Name Description
    System.IO.Stream stream
    T content
    System.Exception error
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromJsonStream<T>(Stream, out T)

    Tries to deserialize an object from JSON data stream.

    Parameters
    Type Name Description
    System.IO.Stream stream
    T content
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromToml<T>(string, out T, out Exception)

    Tries to deserialize an object from TOML string.

    Parameters
    Type Name Description
    string toml
    T content
    System.Exception error
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromToml<T>(string, out T)

    Tries to deserialize an object from TOML string.

    Parameters
    Type Name Description
    string toml
    T content
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromTomlFile<T>(string, out T, out Exception)

    Tries to deserialize an object from TOML file.

    Parameters
    Type Name Description
    string filePath
    T content
    System.Exception error
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromTomlFile<T>(string, out T)

    Tries to deserialize an object from TOML file.

    Parameters
    Type Name Description
    string filePath
    T content
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromYaml<T>(string, out T, out Exception)

    Tries to deserialize an object from YAML string.

    Parameters
    Type Name Description
    string yaml
    T content
    System.Exception error
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromYaml<T>(string, out T)

    Tries to deserialize an object from YAML string.

    Parameters
    Type Name Description
    string yaml
    T content
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromYamlFile<T>(string, out T, out Exception)

    Tries to deserialize an object from YAML file.

    Parameters
    Type Name Description
    string filePath
    T content
    System.Exception error
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    TryFromYamlFile<T>(string, out T)

    Tries to deserialize an object from YAML file.

    Parameters
    Type Name Description
    string filePath
    T content
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    T
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX