language. See JSON.org. It represents
arrays as comma-separated values within brackets, and records as colon
and comma-separated name
:value pairs within braces.
Misty also provides a
JSON record that contains functions
that process JSON text strictly. Strict JSON has better security and interoperability
The text text is parsed, and the resulting value (usually a record or an array) is returned.
The optional reviver parameter is a method that will be called for every key and value at every level of the result. Each value will be replaced by the result of the reviver function. This can be used to reform data-only records into method-bearing records, or to transform date strings into seconds.
set my_data: json.parse( text, ƒ key, value ( key.find("date") then time.number(value) else value ) )
Produce a JSON text from a Misty value. If a record value, at
any level, contains a
json() method, it will be called, and
the value it returns (usually a simpler record) will be JSONified.
If the record does not have a
json() method, and if whitelist
is an array, then only the keys that are listed in the array will be included.
If the space parameter is
true, then line breaks and extra whitespace will be included in the text.
var my_text: json.text( my_data ƒ key, value ( key.find("date") then time.text(value) else value ) )