On Sat, 13 Jul 2019, Sven Schreiber wrote:
Gretl's doc for jsongetb says: "JSON arrays become
gretl arrays, each of which holds either strings or bundles"
And indeed, consider the following:
<hansl>
string j = sprintf("{\"vec\": [1, 2, 3]}")
eval jsongetb(j).vec
</hansl>
which gives:
Array of strings, length 3
[1] "1"
[2] "2"
[3] "3"
So reading in data arrays would seem to need some adjustment on the
gretl side.
We could modify the behavior of jsongetb to turn numeric arrays into
matrices. In a reply to Artur on this topic not so long ago I said
that would be difficult but it turns out I was wrong: we can get
json-glib to tell us when an array holds numeric values.
We'd have to be careful about compatibility; our dbnomics apparatus,
for instance, expects the current behavior. But we could add an option
switch.
Allin