[fpc-pascal] Re: [fpc-devel] FPJSONRTTI: Case insensitive.

Michael Van Canneyt michael at freepascal.org
Thu Jan 24 18:41:23 CET 2013

On Thu, 24 Jan 2013, silvioprog wrote:

> Hello,
> =

> I have this JSON:
> =

> { "id": 1, "name": "Silvio Cl=E9cio" }

JSON is JavaScript and JavaScript *is* case sensitive.

But you can use TJSONObject.IndexOfName with CaseInsentive to True:

     Function IndexOfName(const AName: TJSONStringType; CaseInsensitive : B=
oolean =3D False): Integer;

Line 450 of fpjsonrtti could be changed to set this to True, but it will ha=
ve a bad impact on performance.
Maybe we can have a property for this.

You should fix your incoming JSON instead.


More information about the fpc-pascal mailing list