FasterXML / jackson-dataformats-binary

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

Add convenience methods to for constructing IonObjectMapper.Builder #249

Closed mcliedtke closed 3 years ago

mcliedtke commented 3 years ago

This was referenced in https://github.com/FasterXML/jackson-dataformats-binary/issues/246 and it appears that it may have been resolved by accident.

In any case, this serves to just add some convenience to the creation of an IonObjectMapper:

These convenience methods respect the current defaults:

I've made this change to the 2.12 branch but this isn't urgent and can be moved to 2.13, though it should be backwards compatible

cowtowncoder commented 3 years ago

Agreed, this is a good improvement. Just one question: should this go against 2.13? Ideally since it's API addition, it should; although 2.12.2 is bit special with quite a few non-compliant additions (to resolve existing problems).

mcliedtke commented 3 years ago

I am not particularly strongly opinionated one way or the other. I pretty much had the same thought that 2.12.2 is already a bit special and this doesn't seem all that different to include. But it is also purely just added convenience so there is no rush and could easily wait until 2.13

cowtowncoder commented 3 years ago

@mcliedtke Ok. With that, I think I might as well just merge it as-is :)

cowtowncoder commented 3 years ago

Ah. Was about to comment on inability to set IonParser/Generator features... until I realized they will work, just need to do it bit different. So that's fine. :)