JSON.Decode is standard in Gambas and works very good. It is in the
"gb.web" component.

If you read the data as "string", you can do as follows:

Dim c As New Collection
Dim s As String = "{ "id": 1}

c = JSON.Decode(s)

Or if you want ""/Null in your JSON collection:

Dim c As New JSONCollection
Dim s As String = "{ "id": 1}

c = JSON.Decode(s, True)



2015-01-16 15:06 GMT+01:00 Nigel Verity <nigelver...@hotmail.com>:

> Hi
>
> I would be interested to know whether any Gambas users have already
> created a parser for JSON format data, and would be willing to share the
> relevant code.
>
> I foresee a need to import data from JSON files over the coming months. It
> would save some time if I could avoid having to "reinvent the wheel".
>
> Regards
>
> Nige
>
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to