The JSON data provided in the given string or file is parsed using the Parsing package with the context-free grammar specified by RFC 8259. The type of the return value will vary depending on the data.
Numbers will result in ZZ or RR objects, as appropriate.
|
|
Strings will result in strings.
|
JSON's true and false will result in the corresponding Macaulay2 booleans.
|
|
Due to the implementation of the Parsing package, null cannot be a return value, and so the symbol nil is returned when JSON's null is given.
|
Objects will result in hash tables.
|
Arrays will result in lists.
|
The input may also be a file containing JSON data.
|
|
|
The object fromJSON is a method function.