How to Convert List To JsonObject?
<p>This may to possible of duplicate i need to convert the list to jsonobject like this </p>

<pre><code>{"EmailID":"Djlj@sl.com","PhoneNumber":"870796850","ID":2} 
</code></pre>

<p>like this how can i achieve this so far what i have tried is :</p>

<pre><code> List&lt;CustomerModel&gt; listobj=new ArrayList&lt;CustomerModel&gt;();
    listobj=timetrackerdaoobj.Listtoserver();
            String gsonString=new Gson().toJson(listobj, collectionType);
</code></pre>

<p>In this method am getting jsonarray like this</p>

<pre><code>[{"EmailID":"Djlj@sl.com","PhoneNumber":"870796850","ID":2}]
</code></pre>

<p>But i need format like this:  </p>

<pre><code>{"EmailID":"Djlj@sl.com","PhoneNumber":"870796850","ID":2}
</code></pre>