Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ObjectMapper

ObjectMapper provides functionality for reading and 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.

ObjectMapper will use instances of JsonParser and JsonStringifier for implementing actual reading/writing of JSON.

Hierarchy

  • ObjectMapper

Index

Constructors

constructor

  • new ObjectMapper(defaultStringifierContext?: JsonStringifierContext, defaultParserContext?: JsonParserContext): ObjectMapper
  • Parameters

    • Default value defaultStringifierContext: JsonStringifierContext = JsonStringifier.makeDefaultContext()

      Default context to use during serialization.

    • Default value defaultParserContext: JsonParserContext = JsonParser.makeDefaultContext()

      Default context to use during deserialization.

    Returns ObjectMapper

Properties

defaultParserContext

defaultParserContext: JsonParserContext

Default context to use during deserialization.

defaultStringifierContext

defaultStringifierContext: JsonStringifierContext

Default context to use during serialization.

Methods

parse

  • parse<T>(text: string, context?: JsonParserContext): T

stringify

  • stringify<T>(obj: T, context?: JsonStringifierContext): string

Generated using TypeDoc