Fundamentals
    Preparing search index...

    Class JsonSerializer

    Represents a serializer for JSON.

    Index

    Constructors

    Properties

    DerivedTypeIdProperty: string = "_derivedTypeId"

    Methods

    • Deserialize a array JSON string to an array of the specific instance type.

      Type Parameters

      • TResult extends object

      Parameters

      • targetType: Constructor<TResult>

        Type to deserialize to.

      • json: string

        Actual JSON to deserialize.

      Returns TResult[]

      An array of instances of the target type.

    • Deserialize an array of any instances to an array of specific instance types.

      Type Parameters

      • TResult extends object

      Parameters

      • targetType: Constructor<TResult>

        Type to deserialize to.

      • instances: any

        Actual instances to deserialize.

      Returns TResult[]

      An array of instances of the target type.

    • Deserialize an any instance to a specific instance type.

      Type Parameters

      • TResult extends object

      Parameters

      • targetType: Constructor<TResult>

        Type to deserialize to.

      • instance: any

        Actual instance to deserialize.

      Returns TResult

      An instance of the target type.

    • Serialize with strong type information.

      Parameters

      • value: any

        The value to serialize.

      Returns string

      A JSON string.