[fpc-pascal] FPJSONRTTI: Case insensitive.

silvioprog silvioprog at gmail.com
Thu Jan 24 18:23:15 CET 2013


Hello,

I have this JSON:

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

And my object is:

TPerson =3D class
private
  FID: Int64;
  FName: string;
published
  property ID: Int64 read FID write FID;
  property Name: string read FName write FName;
end;

But, FPJSONRTTI don't find the fields, except if I change my class to:

  property id: Int64 read FID write FID;
  property name: string read FName write FName;

Or my JSON to:

{ "ID": 1, "Name": "Silvio Cl=E9cio" }

So, how to I find all fields but in case insensitive? (like TypInfo
functions)

Thank you!

ps. Marshal of Delphi is case insensitive.

ps2. So, I send this my questions only to fpc-devel or fpc-pascal? :/

-- =

Silvio Cl=E9cio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freepascal.org/lists/fpc-pascal/attachments/20130124/bafd=
cf23/attachment.htm


More information about the fpc-pascal mailing list