Closed PretentiousPotatoPeeler closed 4 years ago
You were right, some endpoints would return a jsonObject when specifying certain parameters. The functions mapping to these endpoints have been changed to allways return a JSONArray, containing exactly one item when the parameters are used.
I ran in to an error where I wanted to only get the Bitcoin price. The initial code did not work:
This resulted in the following error:
This was caused by trying to parse the single returned JSON object to a String.
I propose a new method to get a single price ticker that returns a JSONObject. The original method can be altered to not need a JSONObject parameter.
Please see my proposed solution, I'd love to hear your thoughts on it!