I've noticed that JSONObject toString serialization with "null" value String properties (not null references but "null" values) are handled in invalid way:
JSONObject obj = new JSONObject();
obj.put("key", "null");
System.out.println(obj);
returns
{"key":null}
where it should return
{"key":"null"}
Can it be bypassed somehow?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've noticed that JSONObject toString serialization with "null" value String properties (not null references but "null" values) are handled in invalid way:
JSONObject obj = new JSONObject();
obj.put("key", "null");
System.out.println(obj);
returns
{"key":null}
where it should return
{"key":"null"}
Can it be bypassed somehow?