ClassCastException and NullPointerException
Brought to you by:
aalmiray
I found very silly validation in net.sf.json.JSONObject class on line 926 and 930 in version 2.4.
I try to create a JSON object using this expression:
JSONArray.fromObject("[null, \"null\"]");
Any JSON validator will accept JSON: [null, "null"]
However those two lines throwing error.
Please can you remove validation on null and "null"
Event developer create JSON object such as
{
"null":"null"
}
is still valid.
Thanks,
David
The same validations on lines 1144 and 1148
Development of this library has been moved to GitHub since 2010, please report any issues you may find at https://github.com/kordamp/json-lib/issues