User Tools

Site Tools


token:JSONFromDictionary

JSONFromDictionary

The %JSONFromDictionary%dictionary% token returns the JSON object constructed from the specified dictionary.

The dictionary keys are used as field names for the resulting JSON object, and the dictionary values are the corresponding values.

The token has Pretty and Compact variants (by appending either to the token name), as well as a Strict variant (appending Strict) (for example %JSONFromDictionaryStrictCompact%dictionary%). The order of the variants does not matter, but you cannot have both Compact and Pretty (See the JSON user manual section).

  • JSONFromDictionary (equivalent to JSONFromDictionaryCompact)
  • JSONFromDictionaryCompact
  • JSONFromDictionaryPretty
  • JSONFromDictionaryStrictCompact
  • JSONFromDictionaryStrictPretty

Strict mode affects how the dictionary values will be interpreted. In Strict mode, the dictionary values must be strict JSON objects - strings need to be double quoted and appropriately escaped. In Non-Strict mode, values are assumed to be strings unless they look like JSON containers (containers must always be strictly JSON objects as always) (See the JSON user manual section).

See Also

See the JSON user manual section for more details on JSON.

Actions

Functions

Tokens

Collections

token/JSONFromDictionary.txt · Last modified: 2019/06/24 23:38 by peternlewis