This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes select query , Need to  store objects in a JSONArray Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "select query , Need to  store objects in a JSONArray" Watch "select query , Need to  store objects in a JSONArray" New topic
Author

select query , Need to store objects in a JSONArray

PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212
How can i storer data in a JSONArray ??
I am performing a DataBase select query .
while(rs.next())
{
// How can i put Objects in a JSONArray
}

And what will be the best approach for using JSON to put data in a JSONArray .

Please suggest. your ideas.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30068
    
149

You can build it yourself - it is just text - or use a json java library


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: select query , Need to store objects in a JSONArray
 
Similar Threads
Sorting XML nodes?
How to fill up JSONArray data inside the select tag of JSP Page
Parsing an JSONArray on to JSP Page
Struts2 mapping query
need help building a =hiearchical= JSON object