2

I'm trying to retrieve JSON data from an URL but it appears the data is in the wrong format:

song = {
'artist':'Tom Waits',
'song':'New Coat Of Paint',
'lyrics':'Let\'s put a new coat of paint on this lonesome old town\nSet \'em up, we\'ll be knockin\' em [...]',
'url':'http://lyrics.wikia.com/Tom_Waits:New_Coat_Of_Paint'
}

from this URL: JSON URL

Is there a way to modify the JSON data so it can be parsed correctly?

SwiftyJD
  • 5,257
  • 7
  • 41
  • 92
  • 2
    Don't repost questions. Once again, **this is not JSON** – vadian May 13 '17 at 18:08
  • There is a way around in for JAVA, there must be a way around it for Swift – SwiftyJD May 13 '17 at 18:10
  • https://stackoverflow.com/questions/36038454/parsing-string-as-json-with-single-quotes – SwiftyJD May 13 '17 at 18:10
  • 1
    "There is a way around in for JAVA, there must be a way around it for Swift". This is like "Hey, I'm not respecting the rules, but can you still do something ?" There is no built-in iOS for that case, it's not valid JSON. You may find solutions maybe on GitHub or related ressources sites, but it will pass the message that's the a correct way for JSON, which is not. But as said in your previous question, you're were using wrong URL (that formatted it not as JSON). – Larme May 13 '17 at 20:40

0 Answers0