title: How to convert List <JSONObject> to Json String in java (com.amazonaws.util.json.JSONObject)
body: <p>com.amazonaws.util.json.JSONObject
  Below is the List, i want to convert it into json string.</p>
  
  <p><code>List&lt;JSONObject&gt; jsonObjlist</code> is </p>
  
  <pre><code>[{"Attribute":"EmailAddress","Value":"abc@yahoo.com"}, {"Attribute":"Source","Value":"Missing_Fixed"}, {"Attribute":"mx_Lead_Status","Value":"Registered User"}, {"Attribute":"mx_Age","Value":""}, {"Attribute":"mx_LoginID","Value":"abc@yahoo.com"}, {"Attribute":"mx_Registration_Source","Value":"EMAIL"}]
  </code></pre>
  
  
  
  <pre><code>ObjectMapper objectMapper = new ObjectMapper();
          objectMapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
          objectMapper.enable(SerializationFeature.INDENT_OUTPUT);
          String arrayToJson = objectMapper.writeValueAsString(jsonObjlist);
  </code></pre>
  
  <p>Output i get is </p>
  
  <pre><code>[{"map":{"Attribute":"EmailAddress","Value":"abc@yahoo.com"}},{"map":{"Attribute":"Source","Value":"Missing_Fixed"}},{"map":{"Attribute":"mx_Lead_Status","Value":"Registered User"}},{"map":{"Attribute":"mx_Age","Value":""}},{"map":{"Attribute":"mx_LoginID","Value":"abc@yahoo.com"}},{"map":{"Attribute":"mx_Registration_Source","Value":"EMAIL"}}]
  </code></pre>
  
  <p>Desired out put is </p>
  
  <pre><code>"[{"Attribute":"EmailAddress","Value":"abc@yahoo.com"}, {"Attribute":"Source","Value":"Missing_Fixed"}, {"Attribute":"mx_Lead_Status","Value":"Registered User"}, {"Attribute":"mx_Age","Value":""}, {"Attribute":"mx_LoginID","Value":"abc@yahoo.com"}, {"Attribute":"mx_Registration_Source","Value":"EMAIL"}]"
  </code></pre>