Enumeration-value associative array serialization
import mir.ser.json: serializeJson; enum E { a, b } uint[E] ar = [E.a : 1]; auto car = cast(const)ar; assert(serializeJson(car) == `{"a":1}`); ar.remove(E.a); assert(serializeJson(ar) == `{}`); assert(serializeJson((uint[string]).init) == `{}`);
See Implementation
Enumeration-value associative array serialization