Added a try catch around the parsing to JSONArray since the response can be either Array or object depending on if it contains one or more elements.
Merge pull request #4 from Abrissirba/dev

Response can be either Array or Object