autocomplete returns malformed json

  • 1
  • Problem
  • Updated 2 years ago
  • (Edited)
A request to https://autocomplete.wunderground.com/aq?query=so sometimes returns proper results, sometimes:
{ "RESULTS": [	{
"name": "Social Networking", 
"type": "Site_feature€", "l": "/social/"
},
{
"name": "Solomon Islands", 
"type": "country", 
"c": "SB",
"zmw": "000SO.1.99999",
"tz": "MISSING",
"tzs": "MISSING",
"l": "/global/SO.html",
"ll": "-9999.000000 -9999.000000",
"lat": "-9999.000000",
"lon": "-9999.000000"
},
...
]
}


and sometimes malformed json

{ "RESULTS": [
{
"name": "Social Networking", "type": "Site_feature��4", "l": "/social/" }, { "name": "Solomon Islands", "type": "country", "c": "SB", "zmw": "000SO.1.99999", "tz": "MISSING", "tzs": "MISSING", "l": "/global/SO.html", "ll": "-9999.000000 -9999.000000", "lat": "-9999.000000", "lon": "-9999.000000" }, ... ]}

, which makes JSON.parse (Javascript) throw Unexpected token in JSON
What is this Social Networking and what is it doing in autocomplete?  Where is this �� from? it's \ufffd\u0015\ufffd in Unicode if it helps.
Photo of Omtus

Omtus

  • 1 Post
  • 0 Reply Likes

Posted 2 years ago

  • 1

Be the first to post a reply!