Hi, I'm trying to create a simple TJsonObject with a string variable using UTF8 characters, just like this:
var
lJson: TJsonObject;
lStr: TStringList;
begin
lJson := TJsonObject.Create;
lJson.Add('value', 'Valoración');
lStr := TStringList.Create;
lStr.Text := lJson.AsJson;
lStr.SaveToFile('/tmp/salida.json');
lStr.Free;
lJson.Free;
end;
The resulting file "salida.json" contanis this:
{ "value": "Valoración" }
As you can see the output does not respect the UTF8 value.
I'm using Lazarus 1.9.0 and FPC 3.1.1.