aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes JSON in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JSON in Java" Watch "JSON in Java" New topic
Author

JSON in Java

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Which library would you recommend for JSON in Java ?
There are five listed at json.org
* org.json.
* Json-lib.
* JSON Tools.
* org.json.simple.
* Stringtree.


[My Blog]
All roads lead to JavaRanch
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

I've tried Json-lib and it's fine.
If you still have any recommendations to work with JSON in Java, please tell
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Can I ask why you need a library to work with JSON? All it is a fancy string that is easy to build?

Eric
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

That's right, I could do without a library. I have stored some information (the double combos of Ajax In Action) in a bean, so I wanted to converted it without worrying about colons, brackets and so on. I was reading in an other book yesterday about JSON libraries for server side, so I wanted to give it a shot Do you mean that you never use such libraries ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

Originally posted by Eric Pascarello:
Can I ask why you need a library to work with JSON? All it is a fancy string that is easy to build?


I see a great benefit to such libraries.

Structures can get pretty complicated and I don't think it's much different than building up HTML or XML in string buffers. It's much better to build up a Java strucxture (be it a DOM or otherwise) and then serialize it.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: JSON in Java