User Tools

Site Tools



The %JSONFromVariables%prefix% token returns the JSON object constructed from the variables with the specified prefix.

The variables with names starting with the specified prefix (with the prefix removed) are used as field names for the resulting JSON object, and the variable 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 %JSONFromVariablesStrictCompact%dictionary%). The order of the variants does not matter, but you cannot have both Compact and Pretty (See the JSON user manual section).

  • JSONFromVariables (equivalent to JSONFromVariablesCompact)
  • JSONFromVariablesCompact
  • JSONFromVariablesPretty
  • JSONFromVariablesStrictCompact
  • JSONFromVariablesStrictPretty

Strict mode affects how the variable values will be interpreted. In Strict mode, the variable 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.





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