title: How do I create dummy JSON data on the client in objective C / iOS?
body: <p>I want to set up static dummy data, in JSON, for my app to process.  This is purely client-side; I don't want to retrieve anything from the network.</p>
  
  <p>All the questions and answers I've seen so far have NSData* variables storing what's retrieved from network calls and [JSONSerialization JSONObjectWithData:  ...] usually acting on data that was not created manually.</p>
  
  <p>Here's an example of what I've tried within xcode.</p>
  
  <pre><code>NSString* jsonData = @" \"things\": [{ \
  \"id\": \"someIdentifier12345\", \
  \"name\": \"Danny\" \
  \"questions\": [ \
      { \
          \"id\": \"questionId1\", \
          \"name\": \"Creating dummy JSON data by hand.\" \
      }, \
      { \
          \"id\": \"questionId2\", \
          \"name\": \"Why no workie?\"
      } \
      ], \
  \"websiteWithCoolPeople\": \"http://stackoverflow.com\", \
  }]}";
  
  NSError *error;
  NSDictionary *parsedJsonData = [NSJSONSerialization JSONObjectWithData:jsonData options:kNilOptions error:&amp;error];
  </code></pre>
  
  <p>Attempts like that (and trying to change things, like switching the NSString* to NSData* from that JSON string) have yielded a null parsedJsonData data or exceptions when trying to create that JSON data variable or when trying to parse it.</p>
  
  <p><strong>How do I create dummy JSON data within my own code such that it can be parsed through the normal Foundation classes that parse JSON data?</strong></p>