Twitter users/search.json api is broken


#1

I am trying to parse the example JSON data from the docs https://dev.twitter.com/rest/reference/get/users/search in http://jsonviewer.stack.hu/ website but it says invalid json, is the doc example correct?

Actually this value that makes the hole API to not work. (as the JSON Editor says)
"source": "<a href="http://twitter.com" rel="nofollow">Twitter Web Client</a>",
I cannot parse either any data from this API.

Check this photo: http://i.imgur.com/Wmw2CID.png

Currently the users/search.json twitter api is broken…
Can someone from the staff side or anyone else help me please?

Any help?


#4

You surely miss some escape characters, don’t you?


#5

What exactly do you mean? can you please describe more?


#6

Well the json received must contain some escape characters that you probably missed when you did a copy and paste of the data.


#7

No I did not copy paste wrong, the JSON parser cannot parse the received data from this API because the ‘source’ value data are incorrect formatted in result to brake up the API.

Also the example of the users/search in https://dev.twitter.com/rest/reference/get/users/search cannot be parsed by mine JSON parser neither into any of the online JSON Viewer’s tools on internet.

EDIT: I think the ‘source’ value data should be URLEncoded in order to not break the hole API JSON results

Example:

    "source": "<a href="//www.tweetdeck.com%5C%22" rel='\"nofollow\"'>TweetDeck</a>",

Should be:

    "source": "%3Ca%20href%3D%22%2F%2Fwww%2Etweetdeck%2Ecom%255C%2522%22%20rel%3D%27%5C%22nofollow%5C%22%27%3ETweetDeck%3C%2Fa%3E",

#9