Get all updates of Java4s
Follow Us: Email Newsletter

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 Author ♦

Full Stack( Java/J2EE & UI/UX ) Developer and founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog. 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. ArunVasanth says:

    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.
What would you like to learn today?
Browse these popular technologies
Hibernate spring struts Servlets ajax Log4j jQuery Json Core Java Web Services AngularJs
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Useful Links Current & UpComing Tutorials
  Web Services [ SOAP ], JSP
Contact | About Us | Privacy Policy | Advertise With Us

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