mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-17 20:59:04 +02:00
* TJSJSON.Parse must return a JSValue, JSON spec was amended (https://tools.ietf.org/html/rfc7159)
This commit is contained in:
parent
c9c60fe061
commit
8082c6993e
@ -1,6 +1,6 @@
|
|||||||
program demorest;
|
program demorest;
|
||||||
|
|
||||||
uses sysutils, classes, js, web, db, jsondataset, restconnection;
|
uses sysutils, classes, js, web, db, extjsdataset, jsondataset, restconnection;
|
||||||
|
|
||||||
Type
|
Type
|
||||||
|
|
||||||
|
@ -3553,7 +3553,7 @@ Var
|
|||||||
B : TBookmark;
|
B : TBookmark;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
O:=TJSJSON.parse(Value);
|
O:=TJSJSON.parseObject(Value);
|
||||||
B.Flag:=TBookmarkFlag(O.Properties['flag']);
|
B.Flag:=TBookmarkFlag(O.Properties['flag']);
|
||||||
B.Data:=O.Properties['Index'];
|
B.Data:=O.Properties['Index'];
|
||||||
GotoBookMark(B)
|
GotoBookMark(B)
|
||||||
|
@ -567,7 +567,9 @@ type
|
|||||||
|
|
||||||
TJSJSON = class external name 'JSON' (TJSObject)
|
TJSJSON = class external name 'JSON' (TJSObject)
|
||||||
Public
|
Public
|
||||||
class function parse(aJSON : String) : TJSObject;
|
class function parse(aJSON : String) : JSValue;
|
||||||
|
// Use this only when you are sure you will get an object, no checking is done.
|
||||||
|
class function parseObject(aJSON : String) : TJSObject; external name 'parse';
|
||||||
class function stringify(aValue : JSValue) : string;
|
class function stringify(aValue : JSValue) : string;
|
||||||
class function stringify(aValue,aReplacer : JSValue) : string;
|
class function stringify(aValue,aReplacer : JSValue) : string;
|
||||||
class function stringify(aValue,aReplacer : JSValue; space: NativeInt) : string;
|
class function stringify(aValue,aReplacer : JSValue; space: NativeInt) : string;
|
||||||
|
Loading…
Reference in New Issue
Block a user