serializeValue

String-value associative array serialization

Examples

import mir.ser.json: serializeJson;
import mir.ser.text: serializeText;
uint[string] ar = ["a" : 1];
auto car = cast(const)ar;
assert(serializeJson(car) == `{"a":1}`);
assert(serializeText(ar) == `{a:1}`);
ar.remove("a");
assert(serializeJson(ar) == `{}`);
assert(serializeJson((uint[string]).init) == `{}`);

Meta