Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DU serialization uses property names #1

Merged
merged 2 commits into from
Dec 26, 2024
Merged

Conversation

pchalamet
Copy link
Collaborator

Use a field per field serialization for DU.

type Value =
    | None
    | Int of a:int * b:int
    | Float of float

This now leads to following serializations:

Value.None ==> { _t: "None" }
Value.Int (1, 2) ==> { _t: "Int", a: 1, b: 2 }
Value.Float 1.2 ==> { _t: "Float", Item: 1.2 }

❗ DU of record was and is still broken

@pchalamet pchalamet merged commit 87050c0 into main Dec 26, 2024
2 checks passed
@pchalamet pchalamet deleted the feature/more-unit-tests branch December 28, 2024 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant