Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork233
Make empty tags configurable during serialization#640
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:2.17
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| returnnull; | ||
| } | ||
| if (FromXmlParser.Feature.EMPTY_ELEMENT_AS_EMPTY_ARRAY.enabledIn(_formatFeatures)) { | ||
| returnJsonToken.START_ARRAY.asString() +JsonToken.END_ARRAY.asString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I am not sure how this makes sense -- all we get here is String "[]", which won't be further decoded?
cowtowncoder commentedFeb 19, 2024
Ok, I can see what this PR does, but I am not quite sure how it makes any sense as a feature. |
Croway commentedFeb 19, 2024
Hello, I have an usecase (mostly due to compatibility) that requires to have empty xml tags serialized as json empty array. |
cowtowncoder commentedFeb 19, 2024
@Croway I think this is unfortunately bit too specific to add as a general on/off feature. I suspect it would not be easy to implement as custom deserializer (but might be possible) I would be open to configuration setting that allows configuring value to return as any String (so in your case, you could set it as |
Croway commentedFeb 20, 2024
Thanks for the hint@cowtowncoder I have updated the PR. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/main/java/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.javaShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/main/java/com/fasterxml/jackson/dataformat/xml/deser/FromXmlParser.javaShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.java OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/main/java/com/fasterxml/jackson/dataformat/xml/deser/XmlTokenStream.java OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
cowtowncoder commentedMar 2, 2024
@Croway Ok I think this would work. Before merging, there is one small process part: we'd need CLA from:https://github.com/FasterXML/jackson/blob/master/contributor-agreement.pdf this only needs to be done once, before the first contribution and is good all future contributions. The usual way is to print, fill & sign, scan/photo, email to Looking forward to merging this new feature! |
pjfanning commentedJul 30, 2024
@Croway Did you ever fill in the CLA? The 2.18.0 RC1 is in a few weeks. |
Croway commentedJul 31, 2024
Hi@pjfanning I am truly sorry about this situation, but I am still waiting a response from my company legal team. |
cowtowncoder commentedAug 11, 2024
Quick note: PR would need to be re-based against |
No description provided.