On Thu, 28 Feb 2019, Sven Schreiber wrote:
Am 28.02.2019 um 08:43 schrieb Riccardo (Jack) Lucchetti:
> On Thu, 28 Feb 2019, Sven Schreiber wrote:
>> I'm still talking about stuff I don't fully understand, but maybe we
>> should have a hansl function that writes out the contents of a bundle (or
>> let's say, a well-defined subset of possible contents) as a json string or
>> file. That would complement the existing native jsongetb function.
>> Perhaps such a thing could go into the extra.gfn add-on.
>
> Hm, that'd be quite complex to write, but it's a good idea.
He, is that a challenge? ;-)
Yes. Also known as "bait" ;-)
As I said, my json knowledge is limited to the Wikipedia entry, but
does the
following prototype give a valid json document?
It is. JSON documents normally don't contain newlines. The complexity I
was referring to is linked to the myriad of data types we have in hansl,
each of which requires a different JSON-isation. For example, I would
have stored matrices in a completely different way (that is, vectorisation
+ 2 scalars for dimensions, similar to what we use in mread/mwrite), but
your solution is also nice and has its own advantages.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------