anchor.diff:      if lObj.Class = 'String' then Value := lObj.Value;
       if lObj.Class = 'Boolean' then Value := lObj.Value;
     end;
  -  if value = nil then exit 'null';
  -  if value is boolean then begin 
  -    if boolean(value) then 
  -      exit 'true';
  -    exit 'false';
  -  end;
  -  if value is string then exit JSONQuote(String(value));
  -  if value is double then begin
  -    if Double.IsInfinity(Double(value)) then
  -      exit 'null'
  -    else
  -      exit Double(value).ToString(System.Globalization.NumberFormatInfo.InvariantInfo);
  -  end;
  -  if value is Int32 then exit Int32(Value).ToString;
  -  if value is Int64 then exit Int64(Value).ToString;
  +
  +  var lResult: String := JSON.ToString(value);
  +  if  (assigned(lResult))  then
  +    exit  (lResult);
  +
     lObj := EcmaScriptObject(VAlue);
     if (lObj <> nil) and ((lObj is not EcmaScriptBaseFunctionObject) or (lObj is EcmaScriptObjectWrapper)) then begin
       if aStack.Contains(lObj) then RaiseNativeError(NativeErrorType.TypeError, 'Recursive JSON structure');
  
positive.code:   private
      method JSONStr(aExecutionContext: ExecutionContext; aStack: List<Object>; aGap, aIndent: string; aReplacerFunction: EcmaScriptBaseFunctionObject; 
        aProplist: List<String>; aWork: EcmaScriptObject; aValue: String): string;
      class method JSONQuote(val: String): string;
    end;  
  
  
  implementation
  
  method GlobalObject.CreateJSON: EcmaScriptObject;
  
negative.code:         var lVal := JSONStr(aExecutionContext, aStack, aGap, aIndent, aReplacerFunction, aProplist, lObj, el);
          if lVal <> nil then begin
            if aGap = '' then
              lItems.Add(JSON.QuoteString(el)+':'+lVal)
            else
              lItems.Add(JSON.QuoteString(el)+': '+lVal);
          end;
        end;
        if lItems.Count = 0 then
  