[Pas2js] store escaped strings

Mattias Gaertner nc-gaertnma at netcologne.de
Wed May 16 15:06:09 CEST 2018


On Wed, 16 May 2018 07:47:25 -0500 (CDT)
warleyalex via Pas2js <pas2js at lists.freepascal.org> wrote:

> Issue: since the pas2js client application should process JSON response,
> returned by the web server, I might have issue when I decode such kind of
> text: "\u46C0\u4138\u19A0\u342A\u6056\u1020"

Why not use the browser functions to convert the JSON response to a
TJSObject?

Var
  Data : TJSObject;
...
  Data:=TJSJSON.parseObject(Req.responseText);
  s:=String(Data['someproperty']);
...

Mattias



More information about the Pas2js mailing list