title: How to create a json file in iOS?
body: <p>I have some data and need to create a json file with this structure :</p>
  
  <pre><code>{"eventData":{"eventDate":"Jun 13, 2012 12:00:00 AM","eventLocation":{"latitude":43.93838383,"longitude":-3.46},"text":"hjhj","imageData":"raw data","imageFormat":"JPEG","expirationTime":1339538400000},"type":"ELDIARIOMONTANES","title":"accIDENTE"}
  </code></pre>
  
  <p>Can Please someone give me some code how to to put my data in a json file with this structure or at least an example on how u make json structures? </p>
  
  <p>EDIT</p>
  
  <p>Ok so i wrote some code :</p>
  
  <pre><code>NSString *jsonString = @"[{\"eventData\":{\"eventDate\":\"Jun 13, 2012 12:00:00 AM\",\"eventLocation\":{\"latitude\":43.93838383,\"longitude\":-3.46},\"text\":\"hjhj\",\"imageData\":\"raw data\",\"imageFormat\":\"JPEG\",\"expirationTime\":1339538400000},\"type\":\"ELDIARIOMONTANES\",\"title\":\"accIDENTE\"}]";
  
      NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
      NSError *e;
      NSMutableArray *jsonList = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&amp;e];
      NSLog(@"jsonList: %@", jsonList);
  </code></pre>
  
  <p>jsonList is a json file now ??? And is it in the correct format?? Cause when i print it the output is : </p>
  
  <pre><code>jsonList: (
          {
          eventData =         {
              eventDate = "Jun 13, 2012 12:00:00 AM";
              eventLocation =             {
                  latitude = "43.93838383";
                  longitude = "-3.46";
              };
              expirationTime = 1339538400000;
              imageData = "raw data";
              imageFormat = JPEG;
              text = hjhj;
          };
          title = accIDENTE;
          type = ELDIARIOMONTANES;
      }
  )
  </code></pre>