Using JSONObject In Java Programs

Json » on Feb 1, 2012 { 10 Comments } By Sivateja

Let us see how to use JSONObject in java program, files required..

Jars required to JSON in java program..

  • json-lib-2.2.2-jdk15.jar
  • ezmorph.jar
  • commons-lang.jar
  • commons-logging.jar
  • commons-beanutils.jar
  • ommons-collections.jar

you can download these jars from previous session


  • Make sure you must have all above jar files in your class path
  • Our java program must import net.sf.json.* package

Am not giving any example program for using JSONObject in servlets and using JSONObject in jsp, as its the same logic. Even in the struts too :-)


You Might Also Like

  ::. About the Author .::

- Full Stack Java/J2EE & UI Web Developer
Founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog, Love Java and UI frameworks.
You can sign-up for the Email Newsletter for your daily dose of Java tutorials.


10 Responses to “Using JSONObject In Java Programs”
  1. Ramanujam says:

    Hai Team members of ,the content which is available in this site which is very useful and also much interesting to learn any topic from initial level. Tank you very much

  2. Java4s says:


    You bet, Glad to hear such a feedback :-)
    Thank you.

  3. such an excellent site for the java biginers….thank u soooooooo much

  4. How can we add multiple records to JSON Object?

  5. break says:

    I have ever seen such a simple tutorial like Java4s…:)

  6. Joshua says:

    Can u show a demo of jquery easyui datagrid with jsp /servlet where it returns json object.

  7. fareed says:

    How to iterate json object

  8. Amazing! work compare with others… cheers…

  9. amarnath says:

    Sir please upload more and more examples of JSON for web development examples…Thanks alot


By posting your answer, you agree to our comments policy.
Most Recent Posts from Top Categories
Hibernate Spring Struts
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2018 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.