Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BaseDataType

Base serialization data type

Hierarchy

Index

Methods

allowNull

  • allowNull(): boolean
  • Returns whether null values are okay

    Returns boolean

deserialize

  • deserialize(value: any, targetObject: any, targetKey: any, root: any): void
  • Deserializes a serialized value into the target object under the given key

    Parameters

    • value: any
    • targetObject: any
    • targetKey: any
    • root: any

    Returns void

    String error code or null on success

deserializeWithVerify

  • deserializeWithVerify(value: any, targetObject: any, targetKey: any, root: any): string | void
  • Deserializes a serialized value, but performs integrity checks before

    Parameters

    • value: any
    • targetObject: any
    • targetKey: any
    • root: any

    Returns string | void

    String error code or null on success

getAsJsonSchema

  • getAsJsonSchema(): object
  • Returns the json schema

    Returns object

    • $ref: string

getAsJsonSchemaUncached

  • getAsJsonSchemaUncached(): void
  • INTERNAL Should return the json schema representation

    Returns void

getCacheKey

  • getCacheKey(): string
  • Should return a cacheable key

    Returns string

serialize

  • serialize(value: any): object
  • Serializes a given raw value

    Parameters

    • value: any

    Returns object

verifySerializedValue

  • verifySerializedValue(value: any): void
  • Verifies a given serialized value

    Parameters

    • value: any

    Returns void

    String error code or null on success