JSON Parser

Syntax

	$input.parseJson()

Description

Interprets the input as JSON formatted text and decodes a dictionary from it.

Parameters

name Type Type Description Mandatory Default
input Character string/binary value Text in JSON format Yes -

Return value

Type: Dictionary, list, string, number, truth value

The structured object reconstructed from the JSON input.

Examples

Example 1: Output

	"{foo: 3, bar: true}".parseJson()["foo"]

Output: 3

Calling parseJson() returns the dictionary with the entries "foo" and "bar". From this dictionary, the value of the entry with the key "foo" is returned, i.e. the value 3.

Example 2

	"47".parseJson() + 2

Output: 49

Interprets the character string "47" as the number 47 and adds 2. Note: The expression "47" + 2 would return the character string "472"!