[Pas2js] JSON proposal
warleyalex
warleyalex at yahoo.com.br
Sat Jan 20 14:48:57 CET 2018
Please, consider to include in JS unit, the following global external
variable:
var
JSON: TJSJSON; external name 'JSON';
and then make sure to remove "class" function for the methods.
TJSJSON = class external name 'JSON' (TJSObject)
Public
{class} function parse(aJSON : String) : TJSObject;
{class} function stringify(aValue : 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: String) :
string;
end;
now, we can use everywhere: *JSON.parse( JSObject )*;
instead of the wierd *TJSJSON(JSON.parse( JSObject ))*
--
Sent from: http://pas2js.38893.n8.nabble.com/
More information about the Pas2js
mailing list