Skip to content
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

Add JsonFormat.Features: READ_UNKNOWN_ENUM_VALUES_AS_NULL, READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE #211

Merged
merged 2 commits into from Jan 17, 2023

Conversation

Siwach16
Copy link
Contributor

@Siwach16 Siwach16 commented Jan 14, 2023

Add enum features into JsonFormat.Feature

  • READ_UNKNOWN_ENUM_VALUES_AS_NULL
  • READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE

Related PR: FasterXML/jackson-databind#3731
Issue : FasterXML/jackson-databind#3637

Note: Java Doc Comments are pending.

@cowtowncoder cowtowncoder merged commit 0050943 into FasterXML:2.15 Jan 17, 2023
@cowtowncoder cowtowncoder added this to the 2.15.0 milestone Jan 17, 2023
@cowtowncoder cowtowncoder changed the title Add enum features into JsonFormat.Feature Add JsonFormat.Features: READ_UNKNOWN_ENUM_VALUES_AS_NULL, READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE Jan 17, 2023
cowtowncoder added a commit that referenced this pull request Jan 17, 2023
@tmjchu
Copy link

tmjchu commented May 16, 2023

Hi folks:

After the 2.15 version upgrade -> I am starting to see
Wondering if READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE annotation gets applied by default in some place?

"name":"java.lang.NoSuchFieldError",
      "message":"READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE",
      "stacktrace":"\"at com.fasterxml.jackson.databind.deser.std.EnumDeserializer.createContextual(EnumDeserializer.java:211)\n\tat com.fasterxml.jackson.databind.DeserializationContext.handlePrimaryContextualization(DeserializationContext.java:836)\n\tat com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:550)\n\tat com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:294)\n\tat com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDes ....

@pjfanning
Copy link
Member

@tmjchu - it seems more likely that you are using an old version of jackson-annotations jar with a new version of jackson-databind jar. Try using matching versions, eg 2.15.0 for all jackson-* jars.

@cowtowncoder
Copy link
Member

@tmjchu As per @pjfanning error comes from old version of jackson-annotations or such -- version incompatibility across different Jackson components. This is one reason to use jackson-bom for getting consistent set of dependencies.

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.

None yet

4 participants