• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Parsing an JSONArray on to JSP Page

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi ,

Please tell me this : How can i parse an JSONArray Object

List mybeanList = new ArrayList();
mybeanList.add("S");
mybeanList.add("b");

JSONArray jsonA = JSONArray.fromObject(mybeanList);



Thanks in advance .
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Waiting for answer .
 
Henry Wong
author
Marshal
Pie
Posts: 20882
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I have never used this class myself, but a quick google... it says that the JSON is generated via the toString() method. Doesn't that mean that you should call the method when generating your javascript -- maybe in an assigment, so your javascript can use the result that was calculated by the JSP?

Or are you referring to a different type of parsing here?

Henry
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64620
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi Pavan wrote:Waiting for answer .
Please read this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic