DZone Forums
Go Back   DZone Forums > Community > Languages & Frameworks > Ajax & Javascript
Reload this Page JSON response to populate listbox
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2008
Default JSON response to populate listbox - 06-22-2008, 01:48 AM

Can any one have the code to use JSON in java.
[Aim:Populate a listbox from a server side response
:@Return a JSON Object from servlet,
==>created using JSON tag library and not hard coded json file].
Using Jquery 1.2.6 JsonGet Method

I browsed through and found json implementations in both javascript and plain JSON ,but I need to do it from a servlet.Im using JSON Library too.
How can I do it with JSONObject,to contain all those options and its values.
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 11
Thanks: 0
Thanked 3 Times in 3 Posts
Join Date: Jan 2009
Default 01-25-2009, 12:42 PM

I'm not certain exactly what you're asking, but if you're looking for a Java library you can use to emit JSON to be parsed by JavaScript, it's about as easy as entering "java json library" in Google and looking at the results of that search. The first result, "google-gson" (not surprising they list that first), would probably work perfectly fine.
Reply With Quote
The Following User Says Thank You to dk52519 For This Useful Post:
rick (01-25-2009)
Reply

Tags
json, jsonobject, listbox, populate selectobx, selectbox

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BeanUtils populate for indexed property exception edmund Java 0 12-30-2008 09:28 PM
JSON RPC Rookie here... cant get this code working swoop80 Ajax & Javascript 1 05-29-2008 01:26 PM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com