Open carmenlau opened 6 years ago
In commit 6db39e56d53cee6a30c5009cd34f30a299d767f7, we get the "result" value
from a map is not always true. I found that the result in onSuccess
will have key "result" only when the lambda response is array (See onResponse
implementation below).
So in TypedLambdaResponseHandler
, result.opt("result")
doesn't work when the response is not array. It is not problem of TypedLambdaResponseHandler
, it is problem of original lambda response implementation. If response is array, it will return JSONObject with result key. If response is dictionary, result
key will be omitted. Since the underlying ResponseHandler
onSuccess
only accept JSONObject
. Should we add onSuccess
with JSONArray
for the lambda case? We can discuss
$type=record
support in serializers/deserializers.