title: Writing JSON using SBJSON
body: <p>I have recently started parsing JSON documents using SBJSON Parser, and I am able to read JSON documents just fine. However I am unable to figure out how I am meant to write JSON using this library. Under the documentation</p>
  
  <p><a href="http://stig.github.com/json-framework/api/3.0/interfaceSBJsonStreamWriter.html" rel="nofollow">http://stig.github.com/json-framework/api/3.0/interfaceSBJsonStreamWriter.html</a></p>
  
  <p>There is a class for writing JSON, but I cannot figure out how to use it. There are no tutorials in his documentation on how to use it, and I can't find any tutorials online about using it.</p>
  
  <p>As an example, I tried doing something like this</p>
  
  <pre><code>SBJsonStreamWriter *write = [[SBJsonStreamWriter alloc]init];
  [write writeObjectOpen];
  [write writeString:@"Testing"];
  [write writeObjectClose];
  </code></pre>
  
  <p>But I don't know how to print this out, and I need to be able to write JSON for my project as I will be updating JSON files, so need to understand how to write JSON.</p>
  
  <p>As anyone used this library before to write? If so could you please show me a quick example of how it is done</p>
  
  <p>Thanks in advance!</p>
  
  <p>Note: I can't use the in built JSON Parser released with new xCode as my app must be able to support phones from IOS 4+ and the new Parser won't work on phones that do not have IOS 5 installed</p>
  
  <p>EDIT</p>
  
  <p>Example say I wanted to create a JSON file which consisted of an array of names e.g.</p>
  
  <p>{
      "name":[
              "Elliot Jacobs",
              "Paul",
              "Maria",
              "Richard",
              "Ana"
              ]
      }</p>
  
  <p>EDIT 2:</p>
  
  <p>Example two</p>
  
  <p>{
     "HomeScreen":{
        "Title":{
           "Name":"James Bond",
           "Number":"07789 123 456"
        }
     }
  }</p>