Skip to content

JSON

$bolt.jsonEncode(aList)

Encode list/object to JSON string.

str = $bolt.jsonEncode([:name = "John"])  # '{"name":"John"}'

$bolt.jsonDecode(cJson)

Decode JSON string to list/object.

data = $bolt.jsonDecode('{"name":"John"}')
? data[:name]  # John

$bolt.jsonPretty(aList)

Encode to pretty-printed JSON.

str = $bolt.jsonPretty([:name = "John"])