title: Creating json string using json lib
body: <p>I am using <a href="https://linuxprograms.wordpress.com/2010/05/20/json-c-libjson-tutorial/" rel="nofollow noreferrer">jsonc-libjson</a> to create a json string like below.</p>
  
  <pre><code>{ "author-details": {
          "name" : "Joys of Programming",
          "Number of Posts" : 10
      }
  }
  </code></pre>
  
  <p>My code looks like below</p>
  
  <pre><code>json_object *jobj = json_object_new_object();
  json_object *jStr1 = json_object_new_string("Joys of Programming");
  json_object *jstr2 = json_object_new_int("10");
  json_object_object_add(jobj,"name", jStr1 );
  json_object_object_add(jobj,"Number of Posts", jstr2 );
  </code></pre>
  
  <p>this gives me json string </p>
  
  <pre><code>{
   "name" : "Joys of Programming",
      "Number of Posts" : 10
  }
  </code></pre>
  
  <p>How do I add the top part associated with author details? </p>