title: Java: Generating JSON: Getting exception when try to name object & array
body: <p>I`m trying to generate JSON with structure like this:</p>
  
  <pre><code> "rows": [
      {
          "object": {
              "id": "1"
          },
          "values": [
              "111",
              "reg text",
              "11"
          ]
      }
  ]
  </code></pre>
  
  <p>and here are the code:</p>
  
  <pre><code>.writeStartObject()        
  .writeStartArray("rows")
      .writeStartObject()       //here i can`t name the object
      .write("id", "'1'@1000")
      .writeEnd()
          .writeStartArray()    //here i can`t name the array
              .write("fax")
              .write("646 555-4567")
          .writeEnd()
  .writeEnd()
  .writeEnd();
  </code></pre>
  
  <p>When i tried to add object &amp; array headers inside the brackets, i got an exception "Illegal method during JSON generation, not valid in current context IN_ARRAY".
  How to generate JSON like mine?</p>