Gambas Documentation - /comp/gb.web/json

# JSON (gb.web)

This class allows you to decode and encode the JSON format. See http://www.json.org for more information.

This class is static.

Static properties | Static methods
--- | ---
This property represents a JSON null value. Null | Decodes a JSON string and returns it as a Gambas value. Decode Encodes a Gambas value into a JSON string and returns it. Encode

The mapping between JSON elements and Gambas datatypes is the following:

JSON syntax | JSON element | Gambas datatype
--- | --- | ---
`{ "string": value , ... }` | Object | Collection
`[ value, ... ]` | Array | Variant
"..." | String | UTF-8 String
`-123.45E+6` | Number | Integer / Long / Float
`true` / `false` | Boolean constant | Boolean
`null` | The null constant | NULL or JSON.Null