You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
atdj: add <json repr="object"> for sum types (externally-tagged encoding) (#491)
Sum types annotated with <json repr="object"> now encode tagged variants
as single-key JSON objects {"Constructor": payload} instead of the default
two-element array ["Constructor", payload].
Unit variants (no payload) are always encoded as plain strings regardless
of the repr annotation, consistent with all other backends.
This matches the Rust/Serde default externally-tagged encoding and also
maps naturally to YAML as a single-key mapping:
# array encoding (default):
- - Circle
- 3.14
# object encoding (<json repr="object">):
- Circle: 3.14
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments