#1 2015-03-18 08:58:20

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

JSONDecode and null values

I'm trying to use JSONDecode to consume some JSON with null values. If it encounters a null it breaks off the decoding due to this line in SynCommons.pas

36274     if (Value=nil) or not(EndOfObject in [',','}']) then
               exit; // invalid item separator

Can it be changed to:

36274     if not(EndOfObject in [',','}']) then
               exit; // invalid item separator

Offline

#2 2015-03-18 09:09:02

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,662
Website

Re: JSONDecode and null values

Should be fixed by http://synopse.info/fossil/info/cbb757a3bb

Thanks for the feedback.

Offline

#3 2015-03-18 09:19:45

esmondb
Member
From: London
Registered: 2010-07-20
Posts: 299

Re: JSONDecode and null values

Thanks smile

There's probably the same issue on lines
36307
36335

Offline

#4 2015-03-18 10:23:45

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,662
Website

Re: JSONDecode and null values

Has already been fixed by a later commit.
smile

Offline

Board footer

Powered by FluxBB