How to get rid of backslash and quotes together from JSON data caused by fasterxml.jackson api?
<p>Need help with Json data. Tried several ways but somehow I couldn't find any solution.</p>

<pre><code>   List&lt;BookInfo&gt; list = new ArrayList&lt;BookInfo&gt;();
   String data = null;
   while (cursor.hasNext()) { 
        BookInfo bs= new BookInfo();
        DBObject dbo = cursor.next();
        ArrayList&lt;DBObject&gt; urlArr = (ArrayList&lt;DBObject&gt;)dbo.get("url"); 
        bs.setUrl(urlArr.toString());
        list.add(bs);
        ObjectMapper mapper = new ObjectMapper();
        data = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(list);
   }
   return data;
</code></pre>

<p>Output getting:</p>

<pre><code>  "url": "[ { \"uri\" : \"http://books.info/science\"} , { \"uri\" : \"http://books.info/western\"}]"
</code></pre>

<p>The output should be:</p>

<pre><code>    "url": [ { "uri" : "http://books.info/science"}, { "uri" : "http://books.info/western"}]
</code></pre>

<p>need to get rid of the access double quotes and back slash. Returning the JSON data creating extra double quotes and back slash because of fasterxml.jackson api. Any one knows how to avoid that?</p>