• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSON in Java

 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've tried Json-lib and it's fine.
If you still have any recommendations to work with JSON in Java, please tell
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic