method
Reflect.serialize
Reflect.serialize(entity) -> value
Walks every component the entity carries and every field of each into a generic object value tree: one member per component, each a sub-object of its fields. A fixed field becomes a fixed node, everything else an int node, so a serialize → apply round-trip is bit-exact; the model id rides along under the reserved "@kind" key. Pair it with Json.encode for a one-call save. It names no component or field, so it works over any schema — the pattern auto-save and debug inspectors use.