[Lazarus] [fpc-pascal] Tests results of several pascal based JSON parsers
Anthony Walter
sysrpl at gmail.com
Fri Aug 30 12:23:14 CEST 2019
Michael,
Can you tell me why the second half (N.Items[1].AsUnicodeString) this test
fails? This is the part that decodes "bank teller \u00Ae ".
function VerifyUnicodeChars: Boolean;
const
UnicodeChars = '{ "name": "Joe®Schmoe", "occupation": "bank teller \u00Ae
" }';
var
N: TJSONData;
begin
N := GetJSON(UnicodeChars);
Result := (N.Items[0].AsUnicodeString = 'Joe®Schmoe') and
(N.Items[1].AsUnicodeString = 'bank teller ® ');
N.Free;
end;
begin
WriteLn('Handles unicode chars correctly: ', VerifyUnicodeChars);
end.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190830/2c156bdf/attachment.html>
More information about the lazarus
mailing list