I have the following issue that I\'m not sure how to handle.
My JSON response can look like this:
JSON
{ \"data\": { \"id\": 7, \"
If you have only two possible outcomes for your data, an option would be to try and parse data to one of the expected types, if that fails you know that the data is of other type and you can then handle it accordingly.
See this