mdsami / android-query

Automatically exported from code.google.com/p/android-query
0 stars 0 forks source link

Single Item JSON Array Causes Transform Error #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. server that returns: 
"[{"facebook_id":"XXXXXXXXXX","xmpp_address":"XXXXXXXXXX@XXXXXXXXXX.com"}]"
2. use aQuery to retrieve above with type set JSONObject 
3. Logcat will show "transform error" and the callback object that should have 
be a json object is null

What is the expected output? What do you see instead?
should return json object

What version of the product are you using? On what operating system?
0.15.7

Please provide any additional information below.

Original issue reported on code.google.com by Rob.Isak...@gmail.com on 17 Dec 2011 at 9:20

GoogleCodeExporter commented 8 years ago
Please use type JSONArray.class instead of JSONObject if the root is not a map.

Original comment by tinyeeliu@gmail.com on 18 Dec 2011 at 1:41