SkygearIO / skygear-SDK-Android

Skygear Android SDK
Other
12 stars 36 forks source link

Should allow `JSONObject.NULL` in lambda arguments #231

Closed carmenlau closed 6 years ago

carmenlau commented 6 years ago

When we check for the lambda arguments, we only allow null in isCompatibleArgument checking. From JSONObject doc, if we want to assign null value to a JSON we can only use JSONObject.NULL. We should allow JSONObject.NULL in the checking

Warning: this class represents null in two incompatible ways: the standard Java null reference, and the sentinel value NULL. In particular, calling put(name, null) removes the named entry from the object but put(name, JSONObject.NULL) stores an entry whose value is JSONObject.NULL.

https://developer.android.com/reference/org/json/JSONObject.html