Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "geocortex/infrastructure/SerializationUtils"

Index

Functions

decodeObjectReferences

  • decodeObjectReferences(obj: object): void
  • Performs the inverse of encodeObjectReferences(), i.e. turns "pointers" back into shared object references. Please keep in mind that this alters the passed in object and hence has no explicit return value.

    Parameters

    • obj: object

      The object to decode.

    Returns void

encodeObjectReferences

  • encodeObjectReferences(obj: object): void
  • Replaces shared references within the object graph with special strings that act as "pointers" to the shared object. When the object graph is serialized as JSON, this reduces the serialized footprint and also allows cycles within the object graph, which would normally cause an error. Please keep in mind that this alters the passed in object and hence has no explicit return value.

    Parameters

    • obj: object

      The object to encode.

    Returns void