Hi,
I have a scenario where we are creating a JSONObject for a MAP and there is a possiblity of values being instances of custom class types with no fields initialized. We expect the fields to be retained in JSONObject which is not happening currently. I could think the below line is the reason for the uninitialized fields being ignored.
It would be good to consider JSONParserConfiguration.isUseNativeNulls() to decide if the fields can be ignored, just as implemented at below line.
https://github.com/stleary/JSON-java/blob/master/src/main/java/org/json/JSONObject.java#L335
Thanks
Hi,
I have a scenario where we are creating a JSONObject for a MAP and there is a possiblity of values being instances of custom class types with no fields initialized. We expect the fields to be retained in JSONObject which is not happening currently. I could think the below line is the reason for the uninitialized fields being ignored.
JSON-java/src/main/java/org/json/JSONObject.java
Line 1791 in 24fafcf
It would be good to consider JSONParserConfiguration.isUseNativeNulls() to decide if the fields can be ignored, just as implemented at below line.
https://github.com/stleary/JSON-java/blob/master/src/main/java/org/json/JSONObject.java#L335
Thanks