Jack,
Probably could do with string manipulation. I will have a thought about it. The code might
get a bit ugly and it might not be the fastest ever, but the real time consumer will be
the HTTP post request.
Question about readfile? Can you make an HTTP post request? Can you specify a payload?
Logan
-----Original Message-----
From: gretl-devel-bounces(a)lists.wfu.edu [mailto:gretl-devel-
bounces(a)lists.wfu.edu] On Behalf Of Riccardo (Jack) Lucchetti
Sent: Monday, April 21, 2014 5:43 PM
To: Gretl development
Subject: Re: [Gretl-devel] New function for retrieving data from BLS
On Mon, 21 Apr 2014, Logan Kelly wrote:
> Alan,
> OK. so readfile was easy. I think I missed a trick there. Anyway...
>
> The big difference between Yahoo and the BLS is that the BLS returns a
> JSON format. Any suggestions on parsing a JSON result string? Will
> join do that?
Not easily. In fact, I had to use JSON objects some time ago and I used perl
for that, but we could probably introduce a hansl primitive for converting
bundles from/to JSON objects. The only missing piece of the puzzle would be
that we don't have a generic array type. Allin and I discussed the opportunity
of introducing an "array" data type a few months back. The problem is,
it'll
have to be for the next release.
In the meantime, would your job be doable via the existing hansl string
functions?
-------------------------------------------------------
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
-------------------------------------------------------