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

Add support for implicit tag if struct field not explicitly marked required/optional #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lucasmoten
Copy link

  • Normalizes as Required for field name vs Optional
  • Adds tag 'implicit' when not declared.
  • Don't error when decoding if a required field is implicit.

Reference: https://thrift.apache.org/docs/idl#field-requiredness

optional

  • Write: Optional fields are only written when they are set
  • Read: Optional fields may, or may not be part of the input stream.
  • Default values: are written when the isset flag is set

Most language implementations use the recommended practice of so-called "isset" flags to indicate whether a particular optional field is set or not. Only fields with this flag set are written, and conversely the flag is only set when a field value has been read from the input stream.

…nt error when decoding if a required field is implicit
@lucasmoten lucasmoten changed the title Add support for implicit tag if not explicit required/optional Add support for implicit tag if struct field not explicitly marked required/optional Feb 8, 2017
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