JSON - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Connectivity : Web Features : JSON : JSON/ToString

JSON

  

ToString

  

format expression as JSON string

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

ToString(data)

Parameters

data

-

expression; data to be encoded as JSON

Description

• 

The ToString(data) command formats the expression data as JSON (stored as a Maple string).

• 

The input data must be a structured expression made only using the base types string and numeric and the container types table, list, and set(equation).

Examples

withJSON:

ToStringtablefruit=orange,count=23

[{"count": 23, "fruit": "orange"}]

(1)

ToStringa=b,c=6.283185308

{"a": "b", "c": 6.283185308}

(2)

Compatibility

• 

The JSON[ToString] command was introduced in Maple 2015.

• 

For more information on Maple 2015 changes, see Updates in Maple 2015.

See Also

JSON

JSON[ParseString]