I did a quick search on "JSON parsers in C" and this one looks promising:

http://sourceforge.net/projects/cjson/

Good luck.


On Mon, Apr 21, 2014 at 11:12 PM, Logan Kelly <logan.kelly@uwrf.edu> 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?

 

Logan

 

From: gretl-devel-bounces@lists.wfu.edu [mailto:gretl-devel-bounces@lists.wfu.edu] On Behalf Of Logan Kelly
Sent: Monday, April 21, 2014 4:41 PM


To: Gretl development
Subject: Re: [Gretl-devel] New function for retrieving data from BLS

 

Alan, 

I see your point about including comand line programs. I will have a look at the Yahoo package. 

Logan 

 

 

Sent from my T-Mobile 4G LTE Device

 

-------- Original message --------

From: Allin Cottrell

Date:04/21/2014 4:24 PM (GMT-06:00)

To: Gretl development

Subject: Re: [Gretl-devel] New function for retrieving data from BLS

 

On Mon, 21 Apr 2014, Logan Kelly wrote:

> I have written a function in C# that retrieves data from the BLS API. I
> can integrate this into gretl using a call to a shell command, i.e.
> $(...). But I would like to develop, and make available to the gretl
> community, a getBLS function. Could someone give me some pointers for a
> better integration of the API call and the gretl script? Or can a
> command line program be include in a function package? Also, is this a
> function anyone would use?  If so, I might also think about a getFRED
> function too?

Jack Lucchetti's "yahoo_get" function package (or the server) would be a
good place to look first for an example of accessing a website and
downloading data via hansl.

Off the bat, I don't think it would work to include a command line program
in a function package. For one thing, how would it be included in an XML
file? For another, function packages are intended to be cross-platform and
only dependent on gretl itself (though I guess we could make an exception
for a dependency on third party programs that are themselves available in
gretl-friendly forms for all platforms, such as X13as.)

Allin
_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel


_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel