Options
All
  • Public
  • Public/Protected
  • All
Menu

Class JsonStringifier<T>

JsonStringifier provides functionality for writing JSON. It is also highly customizable to work both with different styles of JSON content, and to support more advanced Object concepts such as polymorphism and Object identity.

Type parameters

  • T

Hierarchy

  • JsonStringifier

Index

Constructors

constructor

Properties

defaultContext

defaultContext: JsonStringifierContext

Default context to use during serialization.

Methods

stringify

  • Method for serializing a JavaScript object or a value to a JSON string.

    Parameters

    • obj: T

      the JavaScript object or value to be serialized.

    • Optional context: JsonStringifierContext

      the context to be used during serialization.

    Returns string

transform

  • Method for applying json decorators to a JavaScript object/value. It returns a JavaScript object/value with json decorators applied and ready to be JSON serialized.

    Parameters

    • value: any

      the JavaScript object or value to be preprocessed.

    • Optional context: JsonStringifierContext

      the context to be used during serialization preprocessing.

    Returns any

Static makeDefaultContext

Static mergeContexts

Generated using TypeDoc