Re: building a simple json tree

2015-01-15 Thread Colin via Digitalmars-d-learn
On Thursday, 15 January 2015 at 12:50:59 UTC, Rikki Cattermole wrote: On 16/01/2015 1:37 a.m., anonymous wrote: On Thursday, 15 January 2015 at 12:10:09 UTC, Rikki Cattermole wrote: On 16/01/2015 12:16 a.m., anonymous wrote: what's the right syntax for building a JSON tree ? I try to do like i

Re: building a simple json tree

2015-01-15 Thread Rikki Cattermole via Digitalmars-d-learn
On 16/01/2015 1:37 a.m., anonymous wrote: On Thursday, 15 January 2015 at 12:10:09 UTC, Rikki Cattermole wrote: On 16/01/2015 12:16 a.m., anonymous wrote: what's the right syntax for building a JSON tree ? I try to do like in an AA but the program throw because the Key doesn't exist: --- impor

Re: building a simple json tree

2015-01-15 Thread anonymous via Digitalmars-d-learn
On Thursday, 15 January 2015 at 12:10:09 UTC, Rikki Cattermole wrote: On 16/01/2015 12:16 a.m., anonymous wrote: what's the right syntax for building a JSON tree ? I try to do like in an AA but the program throw because the Key doesn't exist: --- import std.stdio, std.json; void main(string[]

Re: building a simple json tree

2015-01-15 Thread Rikki Cattermole via Digitalmars-d-learn
On 16/01/2015 12:16 a.m., anonymous wrote: what's the right syntax for building a JSON tree ? I try to do like in an AA but the program throw because the Key doesn't exist: --- import std.stdio, std.json; void main(string[] args) { struct Foo{ string a, b; void writeToJs

building a simple json tree

2015-01-15 Thread anonymous via Digitalmars-d-learn
what's the right syntax for building a JSON tree ? I try to do like in an AA but the program throw because the Key doesn't exist: --- import std.stdio, std.json; void main(string[] args) { struct Foo{ string a, b; void writeToJson(ref JSONValue target) { target[