[Gambas-user] JSON.Decode error in gb.util.web??

T Lee Davidson t.lee.davidson at gmail.com
Mon Nov 9 20:28:25 CET 2020


On 11/9/20 12:56 PM, Martin wrote:
> As you will see there are many key values empty ("": [2, 0, 0, 0],). Well here are two point of view, the firt is the file .json 
> is wrong and the solution is delete the problematic lines or the second is JSON.Reader no skip empty keys.
> 
> ¿JSON objets support empty keys?
> 
> ¿JSON objets support repeated keys?

JSONCollection supports null values.

If a key is duplicated in the same node of a JSON string, it is invalid ASFAIK. When a JSON string is converted to a Collection, 
if there are duplicate keys, the values will be overwritten.


-- 
Lee


More information about the User mailing list