FasterXML / jackson-dataformats-binary

Uber-project for standard Jackson binary format backends: avro, cbor, ion, protobuf, smile
Apache License 2.0
316 stars 136 forks source link

Allow disabling native type ids when deserializing for #270 #271

Closed manaigrn-amzn closed 3 years ago

manaigrn-amzn commented 3 years ago

This allows the check for native type ids to be disabled while deserializing. I would like to get feedback on this approach.

With the following example, native type ids will not be expected when deserializing.

IonObjectMapper mapper = new IonObjectMapper();
mapper.disable(IonParser.Feature.USE_NATIVE_TYPE_ID);

The full explanation of the problem this is solving can be found in #270

cowtowncoder commented 3 years ago

Sounds reasonable. The only concern I have is that ideally new functionality should be in a new minor version (2.13). Ion format has had a few challenges and this has not really been enforced, so it may be necessary to have one more exception here (since this may well be blocking problem), but I mention this just for future reference. (2.13.0 release is still out 2 months or more, no release candidate yet planned).

Would like to have another opinion from other contributors, but makes sense to me. I'll add this to my todo list to re-review and make sure it can be merge before 2.12.3 is finalized (there are a few other changes and I plan to release that within 2 weeks or so).

cowtowncoder commented 3 years ago

@manaigrn-amzn quick note: I assume this is under amazon ccla, so no need for separate cla.

manaigrn-amzn commented 3 years ago

[...] so it may be necessary to have one more exception here (since this may well be blocking problem) [...]

Yeah, it would be greatly appreciated to get this change released as fast as possible. We are on a tight deadline to migrate to 2.12.x, and we are blocked without this change.

@manaigrn-amzn quick note: I assume this is under amazon ccla, so no need for separate cla.

Yes, that is correct.