serializeToJson

JSON serialization function.

string
serializeToJson
(
V
)
(
auto ref V value
)

Examples

import asdf;

struct S
{
    string foo;
    uint bar;
}

assert(serializeToJson(S("str", 4)) == `{"foo":"str","bar":4}`);

Meta