title: Syntax for passing “no options” to a parameter of type NSJSONWritingOptions
body: <p>In Objective-C I wrote code like the following:</p>
  
  <pre><code>NSError *error;
  NSData *jsonData = [NSJSONSerialization dataWithJSONObject:someDictionary
                                                     options:0
                                                       error:&amp;error];
  </code></pre>
  
  <p>I am trying to do the same thing in Swift. With some prompting from Xcode’s syntax checking I wrote it like this:</p>
  
  <pre><code>var jsonError: NSError
  let jsonData = NSJSONSerialization.dataWithJSONObject(someDictionary, options: NSJSONWritingOptions(), error: &amp;jsonError)
  </code></pre>
  
  <p>but this gives me an error: “Could not find an overload for <code>init</code> that accepts the supplied arguments.” I think the problem might be with the <code>NSJSONWritingOptions()</code> bit, and I’m guessing I just have the Swift syntax wrong. I tried replacing <code>NSJSONWritingOptions()</code> with <code>NSJSONWritingOptions(0)</code> and got the same error; I tried replacing it with <code>nil</code> (as suggested by <a href="https://stackoverflow.com/a/24013852/371228">this answer</a>) but I got the error “Could not find an overload for <code>__conversion</code> that accepts the supplied arguments.”</p>
  
  <p>How can I indicate that I want the default JSON writing options, whatever those might be?</p>