android - Convert JSONObject to ParseObject -
i using parse cloud code, have set return type of cloud code list<parseobject>
.
parsecloud.callfunctioninbackground("getobjects", params, new functioncallback<list<parseobject>>() { @override public void done(list<parseobject> objects, parseexception e) { if (e == null) { // } else { e.printstacktrace(); } } });
when query 5 objects, can retrieve parseobjects, don't face problem, when query lot of objects, error
caused by: java.lang.classcastexception: org.json.jsonobject$1 cannot cast com.parse.parseobject".
i have done research, cloud code happened return jsonobject
, why able retrieve 5 objects parse objects when comes many objects, type returned jsonobject
?
check if parse cloud code retrieving json or object.
check line this:
res.success(json.stringify(results))
and change to:
res.success(results)
Comments
Post a Comment