Hi,
I have a relatively simple JSON object consisting of some integer and string
fields and a large (500-500000 entries) float array.
Following the parsedemo.pp I extract the values from JSON and put them in my
pascal class. All works as expected only that I do not seem to find a method to
copy the complete float array from the TJSONArray object to an array of double
in one go. I can do it manually by traversing the array but wouldn't it be more
convenient to have this functionality in TJSONArray (same for string, integer
and other arrays). Am I missing something?
On another note. There is no automatic way to create an instance of a custom
class from a TJSONObject or is there?
JSON: {"fooStr":"foobar","fooInt":700,"fooFloatArray":[1.1, 1.2, 1.3]}
Pascal:
TMyCustomClass = class
fooStr: String;
fooInt: Integer;
fooFloatArray: array of double;
end;
Thanks for any info on this matter.
R.
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal