comp • gb.web • json

JSON (gb.web)

This class allows you to decode and encode the JSON format. See for more information.

This class is static.

Static properties

Static methods
This property represents a JSON null value.
Decodes a JSON string and returns it as a Gambas value.
Encodes a Gambas value into a JSON string and returns it.
FromString   ToString  

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