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 FromXmlParser.Feature.PROCESS_XSI_NIL to allow disabling processing of xsi:nil attributes on reading #468

Closed
cowtowncoder opened this issue Apr 8, 2021 · 1 comment
Milestone

Comments

@cowtowncoder
Copy link
Member

cowtowncoder commented Apr 8, 2021

(note: sort of related to #467)

Although xsi:nil usually makes sense to be used, it probably makes sense to NOT process it when reading as JsonNode (just as an example). It seems simple enough to add a new feature in FromXmlParser.Feature (default: enabled) for something like

FromXmlParser.Feature.PROCESS_XSI_NIL

The main use case would be to allow preserving the attribute (and possible contents, if any): when processing is enabled it will be coerced into null which may not always be desired.

@cowtowncoder cowtowncoder changed the title Add a feature to disable processing of xsi:nil attributes on reading Add FromXmlParser.Feature.PROCESS_XSI_NIL to allow disabling processing of xsi:nil attributes on reading Jul 8, 2021
@cowtowncoder cowtowncoder added this to the 2.13.0 milestone Jul 8, 2021
@cowtowncoder
Copy link
Member Author

Added for 2.13.0-rc1.

One unfortunate limitation: will NOT work for root element in 2.x since feature flag override only occurs after parser initialization. Fixed in 3.0.

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

No branches or pull requests

1 participant