JSON Helper. Can be used to serialize and deserialize both JavaScript and Java objects, unlike the native JSON object. It also includes options to include/exclude null values and convert to/from se.curity.identityserver.sdk.attribute.Attributes.

Hierarchy

  • Json

Methods

  • Serialize the given attributes to JSON.

    Parameters

    Returns string

  • Deserialize the given JSON string into an object. Null values are excluded.

    Parameters

    • json: string

    Returns object

  • Deserialize the given JSON string into a Java object of the given type. To create a Java Class object to use with the type argument, use Java.type("fully.qualified.JavaName").

    Parameters

    • json: string
    • type: any

    Returns any

  • Deserialize the given JSON string into an object.

    Parameters

    • json: string
    • includeNulls: boolean

    Returns object

  • Deserialize the given JSON string into an array. Null values are excluded.

    Parameters

    • jsonArray: string

    Returns any[]

  • Deserialize the given JSON string into an array.

    Parameters

    • jsonArray: string
    • includeNulls: boolean

    Returns any[]

  • Deserialize the given JSON string into attributes.

    Parameters

    • json: string

    Returns Attributes

  • Serialize the given object or Java Map to JSON. Null values are excluded.

    Parameters

    • object: object

    Returns string

  • Serialize the given object or Java Map to JSON.

    Parameters

    • object: object
    • includeNulls: boolean

    Returns string

  • Serialize the given value to JSON. Null values are excluded.

    Parameters

    • object: any

    Returns string

  • Serialize the given value to JSON.

    Parameters

    • object: any
    • includeNulls: boolean

    Returns string