-
-
Notifications
You must be signed in to change notification settings - Fork 141
Allow disabling native type ids in IonMapper #232
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
Conversation
First things first:
As to |
One note: timing-wise this is pretty unfortunate: semantically, this would have to wait until 2.13 as it adds new API feature. But depending on how safe the change is, I think I could perhaps consider adding it as "dark launch" in 2.12.x; would remain undocumented until 2.13 but available for those who know about it (and do not mind the technical slight incompatibility between patch versions). |
Okay, my understanding is that that is not the case here. I think the pattern I'm following now is what is wanted, except my
Thanks! 👍 For safety all the existing tests continue to pass unaltered and the new ones pass too ;) Prior to this patch trying to round-trip
I don't imagine that anyone would be sad by a successful deserialization instead though. |
e827b7c
to
b23bc2e
Compare
I've updated this PR to use make How's it looking from your perspective? Does it look mergeable? Is there anything else I can do that would be helpful or customary? |
ion/src/main/java/com/fasterxml/jackson/dataformat/ion/IonParser.java
Outdated
Show resolved
Hide resolved
Looks good and I trust you know what you are doing here, esp. wrt Ion knowledge. |
ion/src/main/java/com/fasterxml/jackson/dataformat/ion/IonGenerator.java
Show resolved
Hide resolved
This change makes the behavior of the Ion format more similar to YAMLMapper in `jackson-dataformat-yaml`. * Native type ids may be disabled in `Ion{Generator,Factory,Mapper}` * IonParser capability introspection `canReadTypeId => true` * IonGenerator#writeTypePrefix override removed, enabling non-native Together these changes allow `AsPropertyDeserializer` with an `IonParser` backing to deserialize either style while the `IonGenerator` will honor its constructed feature set.
b23bc2e
to
392b428
Compare
Merged: had fun time with 3.0 merge, got it done but... somehow looks like 2 of new tests fail, so could probably need help there. |
Never mind, I had managed to accidentally remove a capability introspection method from IonParser; now works. |
This change makes the behavior of the Ion format more similar to
YAMLMapper
injackson-dataformat-yaml
.Ion{Generator,Factory,Mapper}
canReadTypeId => true
Together these changes allow
AsPropertyDeserializer
with anIonParser
backing to deserialize either style while theIonGenerator
will honor its constructed feature set.
This should address #149 and #225.
Open questions:
protected boolean _cfgCreateBinaryWriters = false;
inIonFactory
?Feature
implementJacksonFeature
orFormatFeature
?EnumSet
. Thoughts?