Skip to content

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