[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écio" }

And my object is:

TPerson = 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écio" }

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écio
My public projects - github.com/silvioprog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130124/bafdcf23/attachment.html>


More information about the fpc-pascal mailing list