Re: How to convert array of structs to JSON

2019-06-24 Thread Marco de Wild via Digitalmars-d-learn
On Tuesday, 25 June 2019 at 05:33:57 UTC, mark wrote: I have the following array of structs: struct Person { string name; int age; }; Person people[]; Person p; Person p1 = { "Bob", 12 }; Person p2 = { "Bob", 12 }; people ~= p1; people ~= p2; I've read through the s

How to convert array of structs to JSON

2019-06-24 Thread mark via Digitalmars-d-learn
I have the following array of structs: struct Person { string name; int age; }; Person people[]; Person p; Person p1 = { "Bob", 12 }; Person p2 = { "Bob", 12 }; people ~= p1; people ~= p2; I've read through the std.json documentation, but I'm still confused as to ho