Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 24.0
Syntax
Code Block
languagenone
set anObject = aString.extendedJSONToClass()
set anObject = extendedJSONToClass(literal)
Semantics

The operation extendedJSONToClass() takes an Extended JSON string (aString) and tries to map it to anObject. If this is not possible, an error is raised.

By default, the following mapping rules apply:

  • Extended JSON attributes are mapped to class attributes having the same name.
  • Attributes not defined in the target class are ignored.

For more mapping details refer to JSON Type Mapping. These details also refer to Extended JSON.

Substitutables

aString

An Extended JSON document as String.

anObject

Target object, can be any object.

literal

String literal.

Examples
Code Block
languagenone
set myAddress = mongoDbDocument.extendedJSONToClass();

See jsonToClass for more examples.

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNamemongodb
nopaneltrue
PageWithExcerptINTERNAL:_examples_BRIDGE
For more information on Extended JSON refer to MongoDB Extended JSON.

rp
Panel
titleRelated Pages:
rde
Panel
titleRelated Documentation: