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

Optional fixed fields don't compile #154

Closed
rooooooooob opened this issue Mar 14, 2023 · 0 comments · Fixed by #204
Closed

Optional fixed fields don't compile #154

rooooooooob opened this issue Mar 14, 2023 · 0 comments · Fixed by #204

Comments

@rooooooooob
Copy link
Collaborator

bar = {
  ? 5: "five",
}

Will refer to field self.key_5 which doesn't exist. This should either be supported or it should panic during generation telling the user that it's not supported.

If we support it we could either(for --preserve-encodings=false):

  1. Ignore it for serialization and parse it (but ignore) for deserialization.
  2. Have a x_present: bool field.

For --preserve-encodings=true we could stick that x_present in the *Encodings struct like we do for .default support.

rooooooooob added a commit that referenced this issue Jul 27, 2023
Fixes #203

Fixes #154 as this issue popped up while making sure optional fields
were very well supported.
rooooooooob added a commit that referenced this issue Aug 2, 2023
Fixes #203

Fixes #154 as this issue popped up while making sure optional fields
were very well supported.
rooooooooob added a commit that referenced this issue Aug 9, 2023
* Deserialize for array groups with optional fields

Fixes #203

Fixes #154 as this issue popped up while making sure optional fields
were very well supported.

* Optional array fields with preserve-encodings=true
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 a pull request may close this issue.

1 participant