We have a json-string and want to convert it to a corresponding xml-string. In case, that there are null-values in the json-string, we get an unexpected result
JSon-String
What we do
String jsonString="{\"myKey\": null}";
final JSONObject jsonObject = new JSONObject( jsonString );
finalString xmlString = XML.toString( jsonObject));
What we get
<myKey>null</myKey>
What we expect
<myKey/>
Is our expectation correct? If yes, I would do a pull-request and change line 594 in class XML.java