title: Converting swift array into object for json serialization
body: <p>The following code does not compile in Swift 2.0</p>
  
  <pre><code>var eventsIds : [CalendarEventLink?] = [CalendarEventLink?](count: 5, repeatedValue: nil)
  var data = try NSJSONSerialization.dataWithJSONObject(eventsIds, options: [])
  </code></pre>
  
  <p>I'm getting error:</p>
  
  <blockquote>
    <p>'[CalendarEventLink?]' is not convertible to '[AnyObject]'</p>
  </blockquote>
  
  <p>How can I serialise array to json in swift?</p>