Can I use JSONObject instead of HashMap in Java?
<p>I am doing an application which has a server and web, native clients. Whenever a request comes from any of the client server should do the following:</p>

<ol>
<li>Fetch the data/model</li>
<li>For webclient request create a html page by compiling the corresponding JSP page or else for native-client request simply fetches the data alone. </li>
</ol>

<p>Generally I fetch the data and put it into an <code>HashMap</code> and pass it to the JSP page. But for native requests I am planning to return the data in json format. Here my doubt is instead of having data in different objects(<code>HashMap</code> and <code>JSONObject</code>), can I use the <code>JSONObject</code> for both purposes?. Will there be any performance implications when I use <code>JSONObject</code> instead of <code>HashMap</code>?.</p>
