msgraph.graph.jsonhelper

JSON Helpers
License: BSL-1.0.
enum Ignore ignore;
Attribute marking ignore data
enum Essential essential;
Attribute marking essential field
pure nothrow @nogc @safe Name name(string name);
enum Name name(string n);
Attribute forcing field name
alias convBy = ConvBy(alias T);
template convertTo(alias value)
template convertFrom(alias value)
@property JSONValue json(T)(auto const ref T[] x)
if(isSomeString!(T[]));
@property JSONValue json(T)(auto const ref T x)
if(isIntegral!T && !is(T == enum) || isFloatingPoint!T || is(Unqual!T == bool));
@property JSONValue json(T)(auto const ref T x)
if(is(T == enum));
@property JSONValue json(T)(auto const ref T[] ary)
if(!isSomeString!(T[]) && isArray!(T[]));
@property JSONValue json(Value, Key)(auto const ref Value[Key] aa)
if(isSomeString!Key && is(typeof(() { auto v = Value.init.json; } )));
@property JSONValue json(JV)(auto const ref JV v)
if(is(JV : const(JSONValue)));
Get data from JSONValue
pure nothrow @trusted void setValue(T)(ref JSONValue v, string name, T val);
Operation of JSONValue
bool fromJson(T)(in ref JSONValue src, ref T dst)
if(isSomeString!T);
bool fromJson(T)(in ref JSONValue src, ref T dst)
if(isIntegral!T && !is(T == enum));
bool fromJson(T)(in ref JSONValue src, ref T dst)
if(isFloatingPoint!T);
bool fromJson(T)(in ref JSONValue src, ref T dst)
if(is(T == struct) && !is(Unqual!T : JSONValue));
bool fromJson(T)(in ref JSONValue src, ref T dst)
if(is(T == class));
bool fromJson(T)(in ref JSONValue src, ref T dst)
if(is(T == enum));
bool fromJson(T)(in ref JSONValue src, ref T dst)
if(is(T == bool));
bool fromJson(T)(in ref JSONValue src, ref T dst)
if(!isSomeString!T && isDynamicArray!T);
bool fromJson(Value, Key)(in ref JSONValue src, ref Value[Key] dst)
if(isSomeString!Key && is(typeof(() { JSONValue val; cast(void)fromJson(val, dst[Key.init]); } )));
bool fromJson(T)(in ref JSONValue src, ref T dst)
if(is(Unqual!T == JSONValue));
pure nothrow @trusted T getValue(T)(in ref JSONValue v, string name, lazy scope T defaultVal = T.init);
struct AttrConverter(T);
T function(in JSONValue v) from;
JSONValue function(in T v) to;
AttrConverter!T converter(T)(T function(in JSONValue) from, JSONValue function(in T) to);
Attribute converting method
JSONValue serializeToJson(T)(in T data);
string serializeToJsonString(T)(in T data, JSONOptions options = JSONOptions.none);
serialize data to JSON
void deserializeFromJson(T)(ref T data, in JSONValue json);
void deserializeFromJsonString(T)(ref T data, string jsonContents);
deserialize data from JSON