i am using the org.json package in Java (Android) and I am just stumbled with a simple problem.
The webserver returns an array if everything is okay, but an json object { error : true, ...} if something went wrong.
How can I parse that into a common object - I mean both arrays and objects are json after all, but it seems JSONArray and JSONOBject don't share an interface in common.
Am I missing something?