ahausladen / JsonDataObjects

JSON parser for Delphi 2009 and newer
MIT License
413 stars 160 forks source link

Case insensitive names to access nodes #63

Closed jairgza closed 3 years ago

jairgza commented 3 years ago

Hi, please consider add some option to access/find nodes in a case insensitive way.

Some times if the name is not case equal, I get an empty string

jo['NAME'] := 'my name';

s := jo.S['Name'];
s is empty

I know its a logic error and the names must match but, since jsonDataObject returns an empty default value if no node exists without error or warning, looking for nodes in a case insensitive way can reduce this kind of issues that sometimes are difficult to track.

cheers

cesco69 commented 3 years ago

According to JSON-RPC spec, JSON is Case-Sensitive.

9.0 Case-Sensitivity of Procedure and Parameter Names

Conforming implementations MUST treat procedure and parameter names as being case-sensitive such the names bar and BAR would be seen as two distinct entities.