Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on Linux64: TJSONObjectHelper.ReadBoolValue can't get right value #127

Open
starteryao opened this issue Sep 19, 2022 · 0 comments
Open

Comments

@starteryao
Copy link

Describe the bug
on Win32 or Win64 TJSONObjectHelper.ReadBoolValue works fine.
on Linux64 TJSONObjectHelper.ReadBoolValue always return false.
seem that TryGetValue(AName, LValue) can't get value.

To Reproduce
download sources (18, sep 2022)
run MARSTestProject.
test failed on Tests.core
procedure TMARSRecordToJSONTest.Variants;
.... line 330
Assert.AreEqual(True, LJSONObj.ReadBoolValue('Value4'));

Expected behavior

Scenario (please complete the following information):

  • OS: Win10, ubuntun20 on hyper-v
  • delphi 10.2

Additional context
to pass compiling. source modified (line 279).

class function TJSONObjectHelper.TValueToJSONValue(
const AValue: TValue): TJSONValue;
...
{ line 279 }
LTypeName := {$IFDEF LINUX} AValue.TypeInfo^.Name.toString {$ELSE} string(AValue.TypeInfo^.Name) {$ENDIF};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant