You are not logged in.
Hi,
here is the code sample.
var
V, V2 : TDocVariantData;
begin
V.InitJSON('{"DATA":[{"NAME":"Name1","COMMENT":"Comment1"},{"NAME":"Name2","COMMENT":"Comment2"}],"DATA_ROWS":2}');
V2 := TDocVariantData(V.Values[0]);
Assert(V2.Kind = dvArray); // <-- here is OK
V2 := TDocVariantData(V.Value[0]);
Assert(V2.Kind = dvArray); // <- here is exception
end;
When I'm accessing Values property - it returns data as array.
When I'm accessing Value property by index or name - data kind is dvUndefined.
Is this proper behavior?
Hi,
if I try TDocVariant.NewJSON() with the following input: {'id':'10'} - it raises error.
If instead of single quotes I'm using double quotes, i.e. {"id":"10"}, it's fine.
Isn't allowed in JSON to put values and names in singe quotes?
same for me. I was hoping to upload it to my iPad...