title: get json data from java-mongo driver(not list of BasicDataObject)
body: <p>I am doing following in my application server, </p>
  
  <pre><code>  DBCollection collection = mongoDB.getCollection("collection"); 
    DBCursor dbCursor = collection.find(); 
  </code></pre>
  
  <p>I have to send a JSON object to the client from the server, so how can 
  I convert DBCursor Object to JSON.</p>
  
  <p>Actually i am sending a large collection to client, and if i convert documents of this collection into java object than it eat lot of memory, so if there a way to convert dbcursor direct to json string , or any other method which solve my problem.
  it will be great help.
  Thanks.   </p>
  
  <p>Its look like mongodriver create DataObject's objects, when call find method, so it will not help to convert dbcursor into json (which is possible by using serialize() method of com.mongodb.util.JSON class.</p>
  
  <p>Revise Question:</p>
  
  <p>is there any way to get data of a collection directly without using find method.  </p>