-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 EnumFeature.READ_ENUM_KEYS_USING_INDEX
to work with existing "WRITE_ENUM_KEYS_USING_INDEX"
#2536
Comments
Support could be added via new I probably won't have time to tackle this but could help anyone who has time and interest. |
is there anyone working on this? I got some time off so I will make a PR in a day or two |
@JooHyukKim I don't think anyone is working on this, so go ahead! It could make it into 2.15; let me know if you need help with |
@cowtowncoder thanks for your reply. I actually did make a Pull Request on this yesterday. I missed out |
…ithub.com/JooHyukKim/jackson-databind into FasterXML#2536-READ_ENUM_KEYS_USING_INDEX
EnumFeature.READ_ENUM_KEYS_USING_INDEX
to work with existing "WRITE_ENUM_KEYS_USING_INDEX"
With #2129 and jackson 2.10.0 a new Feature WRITE_ENUM_KEYS_USING_INDEX was introduced.
So we now can write an enum used in a map as key as number/enum index.
(This is usefull as the other side is written in C and works indexed based, ...)
That works fine. See Example below.
Problem: the json generated by jackson this way cannot be deserialized.
This unbalanced situation - jackson cannot read his own json - was described in #1877
Seems jackson needs a feature like "READ_ENUM_KEYS_USING_INDEX" (suggestion regarding #2129 )
Sample Code explaining the situation:
Problem:
The text was updated successfully, but these errors were encountered: