System.JSON.Readers.TJsonTextReader.ExtendedJsonMode

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property ExtendedJsonMode: TJsonExtendedJsonMode read FExtendedJsonMode write FExtendedJsonMode;

C++

__property System::Json::Types::TJsonExtendedJsonMode ExtendedJsonMode = {read=FExtendedJsonMode, write=FExtendedJsonMode, nodefault};

Properties

Type Visibility Source Unit Parent
property public
System.JSON.Readers.pas
System.JSON.Readers.hpp
System.JSON.Readers TJsonTextReader

Description

Gets or sets the JSON parse mode.

JSON can only represent a subset of the types supported by BSON. To preserve type information, MongoDB adds the StrictMode and MongoShell extensions to the JSON format.

TJsonExtendedJsonMode possible values are [None, StrictMode, MongoShell].

  • None: No extension.
  • StrictMode: Strict mode extension to parse data representations in strict mode. Strict mode representations of BSON types conform to the JSON RFC.
  • MongoShell: Mongo Shell mode extension to parse data representations in mongo shell mode.

For example, for TBsonType = TimeStamp

Strict Mode:

{ "$timestamp": { "t": <t>, "i": <i> } }

Mongo Shell Mode:

Timestamp( <t>, <i> )
  • <t> is the JSON representation of a 32-bit unsigned integer for seconds since epoch.
  • <i> is a 32-bit unsigned integer for the increment.

See Also