#9 fix for valid json parsing

open
nobody
None
5
2012-09-03
2012-09-03
No

need to add (idx > 1) condition to js_base function:
function js_base(idx: Integer; var ridx: Integer; var o:
TlkJSONbase): Boolean;
begin
skip_spc(idx);
result := (idx > 1) and js_boolean(idx, idx, o);
if not result then result := (idx > 1) and js_null(idx, idx, o);
if not result then result := (idx > 1) and js_number(idx, idx, o);
if not result then result := (idx > 1) and js_string(idx, idx, o);
if not result then result := (idx > 1) and js_list(idx, idx, o);
if not result then result := js_object(idx, idx, o);
if result then ridx := idx;
end;

this will fix the wrong paring of json like this:
841{test:true}

instead of returning nil, it returns TlkJsonNumber

Discussion