Function deserializeJson
Deserializes a JSON value into the destination variable.
The same types as for serializeToJson()
are supported and handled inversely.
See Also
serializeToJson
, serializeToJsonString
, vibe
Example
struct Foo {
int number;
string str;
}
Foo f = deserializeJson!Foo(`{"number": 12, "str": "hello"}`);
assert(f .number == 12);
assert(f .str == "hello");