title: Problems with NSJSONSerialization receiving json got no top header
body: <p>I receive json as <code>NSData</code>, and want to serialise it but I can't get it going.</p>
  
  <p>My code is the following:</p>
  
  <pre><code>func parseDownloadedData(inputData: NSData) -&gt; (Bool)
  {
      var error: NSError?
      var commonData: NSDictionary = NSJSONSerialization.JSONObjectWithData(inputData, options: NSJSONReadingOptions.MutableContainers, error: &amp;error) as NSDictionary
  
      if commonData.count &gt; 0
      {
          var resultInArray : NSMutableArray = commonData.valueForKey("") as NSMutableArray
  
          for result in resultInArray
          {
              let origin = result.objectForKey("origin") as NSString!
              let friendlyNameLong = result.objectForKey("friendlyNameLong") as NSString!
              let state = result.objectForKey("state") as NSString!
  
              createEventObject(origin, friendlyNameLong: friendlyNameLong, state: state)
          }
  
          return true
      }
      else
      {
          return false
      }
  }
  </code></pre>
  
  <p>I also tried creating the resultInArray with a key value, and then using commonData.valueForKey"that value"</p>
  
  <p>But its not working.</p>
  
  <p>My Json return is the following:</p>
  
  <pre><code>{
      "DeviceIpint.0/SourceEndpoint.video:0:0":
      {
          "origin": "DeviceIpint.0/SourceEndpoint.video:0:0"
          ,"state": "signal_restored"
          ,"friendlyNameLong": "0.Indkorsel"
          ,"friendlyNameShort": "IP уcтройcтво [0]"
      }
      ,"DeviceIpint.1/SourceEndpoint.video:0:0":
      {
          "origin": "DeviceIpint.1/SourceEndpoint.video:0:0"
          ,"state": "signal_lost"
          ,"friendlyNameLong": "1.Fasade"
          ,"friendlyNameShort": "IP уcтройcтво [1]"
      }
      ,"DeviceIpint.2/SourceEndpoint.video:0:0":
      {
          "origin": "DeviceIpint.2/SourceEndpoint.video:0:0"
          ,"state": "signal_restored"
          ,"friendlyNameLong": "2.Indgang"
          ,"friendlyNameShort": "IP уcтройcтво [2]"
      }
      ,"DeviceIpint.3/SourceEndpoint.video:0:0":
      {
          "origin": "DeviceIpint.3/SourceEndpoint.video:0:0"
          ,"state": "signal_restored"
          ,"friendlyNameLong": "3.Have"
          ,"friendlyNameShort": "IP уcтройcтво [3]"
      }
      ,"DeviceIpint.4/SourceEndpoint.video:0:0":
      {
          "origin": "DeviceIpint.4/SourceEndpoint.video:0:0"
          ,"state": "signal_restored"
          ,"friendlyNameLong": "4.Garage"
          ,"friendlyNameShort": "IP уcтройcтво [4]"
      }
  }
  </code></pre>