title: error processing json data: The data couldn’t be read because it isn’t in the correct format
body: <p>This error has been annoying all morning, I'm trying to retrieve JSON in the format:</p>
  
  <pre><code>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'
  }
  </code></pre>
  
  <p>from this URL: <a href="http://lyrics.wikia.com/api.php?func=getSong&amp;artist=Tom%20Waits&amp;song=new%20coat%20of%20paint&amp;fmt=json" rel="nofollow noreferrer">JSON URL</a></p>
  
  <p>This is the function I'm using to parse the data:</p>
  
  <pre><code>  func parseJSONFromData(_ jsonData: Data?) -&gt; [String : AnyObject]?
    {
      if let data = jsonData {
        do {
          let jsonDictionary = try JSONSerialization.jsonObject(with: data, options: JSONSerialization.ReadingOptions.mutableContainers) as? [String : AnyObject]//Parses data into a dictionary
  
          return jsonDictionary
  
        } catch let error as NSError {
          print("error processing json data: \(error.localizedDescription)")
        }
      }
  
      return nil
    }
  }
  </code></pre>