[Gambas-user] JSON Parsing

Benoît Minisini gambas at ...1...
Fri Jan 16 19:22:50 CET 2015


Le 16/01/2015 15:15, Alexie a écrit :
> 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)
>
>

For information, in the next Gambas version, JSON class has been moved 
to a new 'gb.util.web' component so that it can be used without 'gb.web'.

Regards,

-- 
Benoît Minisini




More information about the User mailing list