FasterXML / FasterXML/jackson-dataformats-binary

Honor `READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE` feature with Protobuf

Open
#398 5 comments 0 reactions 0 assignees View on GitHub
protobuf
Dominant language
Java
Stars
347
Forks
156
Avg merge
3d 3h
Merged PRs (30d)
22

Description

The wire plugin uses a mechanism of fall-back to default enum value (index 0) when the index is above the one in the schema, this ensure we don't break compatibility when they add a new field upstream, our system still can deserialize the message by fall-back on the default value. Of course some systems want that an exception be thrown when encountering an unknown value.

This behaviour could be setup (enabled or disabled) through the standard DeserializationFeature: READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE

if true we fall-back on the default enum value (index 0) and if false we throw an exception.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.