Dear Bruno.
Please let me re-emphasize the urgency of synchronized interfaces, since even base units like JS have different and sometimes contradicting interfaces. Just one example:
Core Source
TJSJSON = class external name 'JSON' (TJSObject)
Public
class function parse(aJSON : String) : JSValue; <<-- JSValue here !!
Type
TJSValueType = (jvtNull,jvtBoolean,jvtInteger,jvtFloat,jvtString,jvtObject,jvtArray);
Function GetValueType(JS : JSValue) : TJSValueType;
Component Library Source
TJSJSON = class(TJSObject)
public
class function parse(aJSON: string): TJSObject; <<-- TJSObject here !!
TJSValueType --> MISSING!
GetValueType --> MISSING!
This again took me a lot of time to troubleshoot!
Coming back to WEBLib.JSON, I'm afraid to say that this implementation is hopelessly buggy, cumbersome and unneccessarily blown up. JSON is already built in at the core of javascript and in fact, based on what I already learned about javascript during the previous days, there isn't any real reason for an extra JSON class, as far as I can see. It's all already there in the JS unit.
Just one example of a severe bug in WEBLib.JSON even in the basics:
Var
wjs: WEBLib.JSON.TJSON;
wjo: WEBLib.JSON.TJSONObject;
wjs := WEBLib.JSON.TJSON.Create;
wjo := WEBLib.JSON.TJSONObject(wjs.Parse('{"foo":"bar"}'));
wjo.AddPair('answer',42);
Console.log(wjo.ToJSON);
This just prints "{"foo":"bar"}"
. The long-awaited answer to all questions is still missing! This is because the implementation of the class is adding the new key-value pair to an obscure internal list and not to the object itself using a property of the underlying TJSObject. I have given up on this class and written my own, which I am happy to share with anyone who might find this useful.