On Fri, 29 May 2020, Sven Schreiber wrote:
Am 28.05.20 um 20:20 schrieb Allin Cottrell:
> On Thu, 28 May 2020, Sven Schreiber wrote:
>
>> I was wondering about the type information in the written json file. See
>> the attached example. For the strings array "SS" and the nested bundle
>> "bsub" as well as the matrices array "MM" this info is not
explicitly
>> given it seems. Is this intended?
>
> In a word, yes. Native JSON types don't have to be flagged as such. We
> only have to flag "complex" gretl types that are made up of
> ordinary JSON objects, arrays, or values arranged in a particular way.
>
OK thanks. I interpret this to mean that a nested bundle is just an
"object" in Json terminology (if I got that right) while the top-level
bundle in itself (which has a type flag) cannot be an object by the fact
that it is at the top level.
Not quite. A valid JSON string may "start with" an object. Marking
the top-level object with "type" : "gretl_bundle" is just a way of
saying to the reader, "You're reading something that's
gretl-specific, and you should be on the look-out for 'type' tags
that (e.g.) tell you some object is supposed to be a matrix."
Allin