REST.Json.TJsonOption

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TJsonOption = (joIgnoreEmptyStrings, joIgnoreEmptyArrays,
joDateIsUTC, joDateFormatUnix, joDateFormatISO8601, joDateFormatMongo, joDateFormatParse,
joBytesFormatArray, joBytesFormatBase64,
joIndentCaseCamel, joIndentCaseLower, joIndentCaseUpper, joIndentCasePreserve);

C++

enum DECLSPEC_DENUM TJsonOption : unsigned char { joIgnoreEmptyStrings, joIgnoreEmptyArrays, joDateIsUTC, joDateFormatUnix, joDateFormatISO8601, joDateFormatMongo, joDateFormatParse, joBytesFormatArray, joBytesFormatBase64, joIndentCaseCamel, joIndentCaseLower, joIndentCaseUpper, joIndentCasePreserve };

Properties

Type Visibility Source Unit Parent
enum public
REST.Json.pas
REST.Json.hpp
REST.Json REST.Json

Description

Specifies the format options.

Option Description

joDateFormatISO8601

Date format as specified in the ISO 8601 standard. For example: "2014-12-01T13:14:18Z" (Mon, 01 Dec 2014 13:14:18 UTC).

joDateFormatMongo

Date format as specified in MongoDB Extended JSON. For example: { "$date": "2014-12-01T13:14:18.000+00:00" } (Mon, 01 Dec 2014 13:14:18 UTC).

joDateFormatUnix

Date format as specified in the Unix time. For example: "1417439658" (Mon, 01 Dec 2014 13:14:18 UTC).

joDateIsUTC

Time format as specified in the UTC time standard.

joIgnoreEmptyArrays

Format that ignores key-value pairs when the value of a pair is an empty JSON array.

For example, for the following pairs: { "key1": [], "key2": "value2" }, the joIgnoreEmptyArrays format option considers the resulting JSON code as: { "key2": "value2" } instead.

joIgnoreEmptyStrings

Format that ignores key-value pairs when the value of a pair is an empty string.

For example, for the following pairs: { "key1": "value1", "key2": "" }, the joIgnoreEmptyStrings format option considers the resulting JSON code as: { "key1": "value1" } instead.

joIndentCaseCamel

Key name format where the first character is lower-cased and the rest preserves the format.

For example, for the following pair: { "KeyName": "TextSample" } the joIndentCaseCamel format option result is { "keyName": "TextSample" }

joIndentCaseLower

Key name format, where all characters are lower-cased.

For example, for the following pair: { "KeyName": "TextSample" } the joIndentCaseLower format option result is { "keyname": "TextSample" }

joIndentCaseUpper

Key name format, where all characters are upper-cased.

For example, for the following pair: { "KeyName": "TextSample" } the joIndentCaseUpper format option result is { "KEYNAME": "TextSample" }

joIndentCasePreserve

Key name format, where characters case is preserved.

joIndentCaseCamel

Key name format where the first character is lower-cased and the rest preserves the format.

For example, for the following pair: { "KeyName": "TextSample" } the joIndentCaseCamel format option result is { "keyName": "TextSample" }

joIndentCaseLower

Key name format, where all characters are lower-cased.

For example, for the following pair: { "KeyName": "TextSample" } the joIndentCaseLower format option result is { "keyname": "TextSample" }

joIndentCaseUpper

Key name format, where all characters are upper-cased.

For example, for the following pair: { "KeyName": "TextSample" } the joIndentCaseUpper format option result is { "KEYNAME": "TextSample" }

joIndentCasePreserve

Key name format, where characters case is preserved.

See Also