vibe.data serialization policy that maps any enum leaf to / from its
member *name* (string), rather than vibe's default numeric base value.
The reflection layer emits enum schemas as {type:"string", enum:[names…]}
(see jsonSchemaOf), so both directions of marshalling must agree: struct
params/returns and bare-enum values are (de)serialized by-name. The policy
only defines toRepresentation/fromRepresentation for enums, so vibe's
isPolicySerializable is false for every other type and the default
behaviour is preserved (it still recurses into nested struct/array fields,
applying this rule to any enum found at any depth).
vibe.data serialization policy that maps any enum leaf to / from its member *name* (string), rather than vibe's default numeric base value.
The reflection layer emits enum schemas as {type:"string", enum:[names…]} (see jsonSchemaOf), so both directions of marshalling must agree: struct params/returns and bare-enum values are (de)serialized by-name. The policy only defines toRepresentation/fromRepresentation for enums, so vibe's isPolicySerializable is false for every other type and the default behaviour is preserved (it still recurses into nested struct/array fields, applying this rule to any enum found at any depth).