Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TypeIdResolver

Interface that defines standard API for converting types to type identifiers and vice versa. Used by type resolvers (see JsonTypeIdResolver) for converting between type and matching id; id is stored in JSON and needed for creating instances of proper subtypes when deserializing values.

Hierarchy

  • TypeIdResolver

Index

Properties

Properties

idFromValue

idFromValue: (obj: any, context?: JsonStringifierTransformerContext | JsonParserTransformerContext) => string

Method called to serialize type of the type of given value as a String to include in serialized JSON content.

param
param
returns

string

Type declaration

typeFromId

typeFromId: (id: string, context?: JsonStringifierTransformerContext | JsonParserTransformerContext) => ClassType<any>

Method called to resolve type from given type identifier.

param
param
returns

ClassType

Type declaration

Generated using TypeDoc