I made a small change
test = jsonget(json, "$.message[*]")
and it works just fine. I could have sworn I tried that and it did not work, but oh well.
Thanks for your help and clarification.
Logan
-----Original Message-----
From: gretl-devel-bounces(a)lists.wfu.edu [mailto:gretl-devel-
bounces(a)lists.wfu.edu] On Behalf Of Allin Cottrell
Sent: Thursday, July 24, 2014 5:13 PM
To: Gretl development
Subject: Re: [Gretl-devel] Posible issue with jsonget()
On Thu, 24 Jul 2014, Logan Kelly wrote:
> The following does not work, and I cannot figure out why
> sprintf json
"{\"status\":\"REQUEST_SUCCEEDED\",\"responseTime\":1103,\"message\":
[\"No Data Available for Series LEU0254555900 Year: 1950\",\"No Data
Available for Series LEU0254555900 Year: 1951\",\"No Data Available for
Series LEU0254555900 Year:
1952\"],\"Results\":{\"series\":[{\"seriesID\":\"LEU0254555900\",\"data\":[]}
]}}"
> printf "%s\n", json
> test = jsonget(json, "$.message")
> printf "test = \n %s", test
It's failing because the query returns an array of arrays, which up till now has
not been a handled type. In CVS we now try drilling down to find something
that's an array element.
Allin
_______________________________________________
Gretl-devel mailing list
Gretl-devel(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel