Wire and authored JSON carry the member's name — one spelling, the file's own, rather than an index that means nothing off the wire.
String toWire(Object value) => nameOf(value);