Trying to parse the following simple json response from instagram with gson but I get back “com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 21”:
{provider_url: http://instagram.com/, media_id: \"312873405259835666_223937937\", title: \"#summer\", url: http://distilleryimage2.instagram.com/d4e0e83021cc11e2b74c22000a9f1427_7.jpg, author_name: \"kajsataskinen\", height: 612,width: 612,version: \"1.0\",author_url: http://instagram.com/, author_id: 223937937,type: \"photo\",provider_name: \"Instagram\"}
If I enclose the http links in double quotes it works fine.
Any ideas?
You can get an instagram json response here: http://instagram.com/api/v1/oembed/?url=http://instagr.am/p/RXjLRULekS/
Thanks
Two things I can see.
What you posted as the response is not actually what it responded with
The string there is escaped, probably messing something up.