appcelerator/titanium_mobile — pull request #2318 by twaddington (2012-06-04 21:31:39+00:00)
Title: Update the 'fromJSON' method of 'KrollDict' to map JSONObject.NULL to null.

Currently the KrollDict.fromJSON method ignores JSONObject.NULL values and inserts them into the Map unmodified. This is generally not a huge deal, but if you try to pass the resulting KrollDict instance to the Javascript layer via a KrollFunction callback, the JNI layer crashes:

https://gist.github.com/2dd449f4fbb9e6c5b7f3

I'm not sure if you're going to like this patch, but I thought I'd take a stab at it. I'm unsure if any tests would need to be modified, because I'm not familiar with your development stack.

Looking for feedback.