JsonXMLStreamReader does not allow to set any XML version (nor encoding)
victornoel opened this issue · 2 comments
Hi,
Apparently, when using a JsonXMLStreamReader
, getVersion()
and getCharacterEncodingScheme()
always return null.
In some case this can be problematic, for example I got confronted to this bug: https://bugs.openjdk.java.net/browse/JDK-8016914.
It could be great if it was possible for the user to give values to return for these information.
For example via a configuration property? I'm not sure how :)
However, returning null
is correct according to the StAX spec because there is no XML declaration.
Yes I know :)
It's more of a feature request than a bug, I guess it could make sense to decide which version of XML should be outputed from a JSON to XML conversion? Not sure if it is the usual way to do it though…