title: Convert JSON from Notification into URL
body: <p>I am having a bit of trouble with converting a body message I am receiving from a notification into a URL. I am getting the following error:</p>
  
  <blockquote>
    <p>Could not cast value of type '__NSCFString' (...) to 'NSURL' (...)</p>
  </blockquote>
  
  <p>I am doing this the following way:</p>
  
  <pre><code>let aps = userInfo["aps"] as? Dictionary&lt;String, AnyObject&gt;
  let alert = aps?["alert"] as? Dictionary&lt;String, AnyObject&gt;
  let body = alert?["body"]
  let url = body as! URL
  </code></pre>
  
  <p>The JSON Structure is <code>aps: { alert: { body: "www.google.com"</code></p>
  
  <p>Question: Why is the casting failing here?</p>