I was having some problem when trying to extract information out from JSON. Here is the example of my JSON:
// removed
My responseMessage is just a string. And my code to extract the info out:
// removed
I tried to follow the solution from this thread However, nothing has been printed out and there is no error message. Any ideas on how to resolve this? Thanks!
EDIT
I realized the problem is due to this error: java.lang.ClassCastException: org.json.simple.JSONObject cannot be cast to org.json.JSONObject
However, if I changed my import for JSONObject to import org.json.simple.JSONObject; the code above will break. Any ideas?
responsein curly braces.schedulesarray but it's nested underresponse. Apart from this there doesn't seem to be any obvious error. Separate note, paste json instead of image.usernamewith similar code. Though I usedgson. Debugging is the only solution.