Re: std.json tree navigation help

2014-01-27 Thread cal

On Monday, 27 January 2014 at 06:51:57 UTC, dennis wrote:
I am having trouble understanding how to navigate the tree 
returned by std.json.  I am new to D programming, I have tried 
reading the std.json source code but I am still stumped.


I usually end up doing something like this when dealing with 
std.json:


http://dpaste.dzfl.pl/bcb14d6a;


Re: std.json tree navigation help

2014-01-27 Thread Dan Killebrew
Check out the json module in vibe.d. Maybe copy it into your own 
application (since it can't be used as a library, yet).

http://vibed.org/api/vibe.data.json/
https://github.com/rejectedsoftware/vibe.d


std.json tree navigation help

2014-01-26 Thread dennis
I am having trouble understanding how to navigate the tree 
returned by std.json.  I am new to D programming, I have tried 
reading the std.json source code but I am still stumped.


I want to iterate the tree of JSONValue(s) by the json objects 
key names and I need to be test the type of the value pointed to 
by the key name so that I can descend into arrays or other 
objects as needed.  Basically I want search the JSONValue tree 
but I am stumped on how to do this.  Any examples or hints would 
be appreciated.