title: Convert Java Array Object to JSON using Jackson
body: <p>I need to conver java array object to JSON, i am using jackson for this. I can only think that for every field name i have to iterate from the array which means i have to iterate the same array object for each field. Is there any efficient way of doing it?</p>
  
  <pre><code>        JsonGenerator jGenerator = jfactory.createJsonGenerator(out);
          jGenerator.writeStartObject();
          jGenerator.writeFieldName("images");
          jGenerator.writeStartArray();
          for(int i=0; i &lt; topicBean.getTopicVOArray().length; i++){
              jGenerator.writeString(topicBean.getTopicVOArray()[i].getBody());
          }
          for(int i=0; i &lt; topicBean.getTopicVOArray().length; i++){
              jGenerator.writeString(topicBean.getTopicVOArray()[i].getTopicGuid()());
          }
  </code></pre>