ahausladen / JsonDataObjects

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

Loading bool values #37

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi Andreas,

I suggest to change this line: https://github.com/ahausladen/JsonDataObjects/blob/master/Source/JsonDataObjects.pas#L2571

From:

Result := string(FValue.S) = 'true';

to:

Result := BoolToStr(string(FValue.S));

... this would allow to use "True" or "TRUE" also inside the JSON file...

brunosanson commented 7 years ago

👍

ahausladen commented 7 years ago

"True" and "TRUE" are no valid JSON expressions. See http://www.json.org/

ghost commented 7 years ago

Thank you for your explaination.