JSON - Maple Programming Help

JSON

Tools for parsing and generating data in JSON format

 Calling Sequence JSON[command](arguments) command(arguments)

Description

 • JSON (JavaScript Object Notation) is a lightweight data-interchange format.
 • The JSON package is a collection of commands for parsing JSON data into Maple expressions, and for encoding Maple expressions into JSON format.

Accessing JSON Package Commands

 • Each command in the JSON package can be accessed by using either the long form or the short form of the command name in the command calling sequence.
 • Because the underlying implementation of the JSON package is a module, it is possible to use the form JSON:-command to access a command from the package. For more information, see Module Members.

List of JSON Package Commands

 • The following is a list of commands available in the JSON package.

 • To display the help page for a particular JSON command, see Getting Help with a Command in a Package.

Examples

 > with(JSON):
 > ParseString("{\"count\" : 3}");
 ${table}{}\left(\left[{"count"}{=}{3}\right]\right)$ (1)
 > ToString( table([ "a"=[2,3,4,5], "b"=3 ]) );
 ${"\left\{"a": \left[2, 3, 4, 5\right], "b": 3\right\}"}$ (2)

Compatibility

 • The JSON package was introduced in Maple 2015.