@samatawy/diagrams
    Preparing search index...

    Class JsonSerializer

    Serializes and deserializes data to and from JSON format.

    Implements

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Serializes the given data to a JSON string.

      Parameters

      • data: unknown

        The data to serialize.

      Returns string

      A JSON string representing the serialized data.

    • Deserializes the given JSON string to an object of type T.

      Type Parameters

      • T

      Parameters

      • json: string

        The JSON string to deserialize.

      Returns Promise<T>

      A promise that resolves to an object of type T.