#1 2023-04-08 21:27:35

tbo
Member
Registered: 2015-04-20
Posts: 335

Error with output "false"

Delphi 11.3, mORMot2 GitHub commit 5225 (da76642)

The word "false" is displayed incorrectly in the output. It concerns only the case "false" and not "true". All other data types are also displayed correctly. The string for "false" has the hex value "05 66 61 6C 73", but should have "66 61 6C 73 65". You can reproduce it with following test source code:

var
  p: PDocVariantData;
begin
  p := _Safe(_Json('{"EnableCORS":false}'));
  ShowMessage(Utf8ToString(FormatUtf8('%: %', [p.Names[0], p.Value[0]])));

With best regards
Thomas

Offline

#2 2023-04-11 09:12:41

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,237
Website

Re: Error with output "false"

You are right.

Please try
https://github.com/synopse/mORMot2/commit/28f5a31d

Thanks for the feedback.

Offline

Board footer

Powered by FluxBB