Search Results for

    Show / Hide Table of Contents

    Class JsonNetDebug

    Inheritance
    object
    JsonNetDebug
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9
    Assembly: Glitch9.dll
    Syntax
    public static class JsonNetDebug

    Methods

    | Edit this page View Source

    Deserialize(JObject, Type, JsonSerializer)

    Non-generic overload.

    Declaration
    public static object Deserialize(JObject jo, Type type, JsonSerializer serializer)
    Parameters
    Type Name Description
    JObject jo
    Type type
    JsonSerializer serializer
    Returns
    Type Description
    object
    | Edit this page View Source

    DeserializeArray<T>(JArray, JsonSerializer)

    Debug-deserialize an array where each element is isolated. Elements that fail are skipped and logged. This is slow; use only for debugging.

    Declaration
    public static List<T> DeserializeArray<T>(JArray array, JsonSerializer serializer) where T : class
    Parameters
    Type Name Description
    JArray array
    JsonSerializer serializer
    Returns
    Type Description
    List<T>
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Deserialize<T>(JObject, JsonSerializer)

    Debug-deserialize a JObject into an object with per-property isolation.

    1. Try normal deserialization first.
    2. If it fails, create an instance and apply properties one-by-one, logging the property that fails to deserialize/set. This is slow; use only for debugging.
    Declaration
    public static T Deserialize<T>(JObject jo, JsonSerializer serializer) where T : class
    Parameters
    Type Name Description
    JObject jo
    JsonSerializer serializer
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Deserialize<T>(string, JsonSerializerSettings)

    Debug-deserialize a JObject into an object with per-property isolation.

    1. Try normal deserialization first.
    2. If it fails, create an instance and apply properties one-by-one, logging the property that fails to deserialize/set. This is slow; use only for debugging.
    Declaration
    public static T Deserialize<T>(string json, JsonSerializerSettings jss) where T : class
    Parameters
    Type Name Description
    string json
    JsonSerializerSettings jss
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    Serialize(object, JsonSerializer)

    Serialize an object to JObject with detailed error handling per property. If a property fails to serialize, it is logged and set to null in the output. This helps to identify problematic properties in complex objects.

    Declaration
    public static JObject Serialize(object data, JsonSerializer serializer)
    Parameters
    Type Name Description
    object data
    JsonSerializer serializer
    Returns
    Type Description
    JObject
    | Edit this page View Source

    SerializeArray<T>(IList<T>, JsonSerializer)

    Serialize array with error handling for each element. If an element fails to serialize, it is skipped and an error is logged. This helps to identify and isolate problematic elements in large collections. This is super slow so don't forget to replace with normal serialization after debugging.

    Declaration
    public static string SerializeArray<T>(IList<T> array, JsonSerializer serializer)
    Parameters
    Type Name Description
    IList<T> array
    JsonSerializer serializer
    Returns
    Type Description
    string
    Type Parameters
    Name Description
    T
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation