Announcement Announcement Module
Collapse
No announcement yet.
JSON encoding Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSON encoding

    Hi everyone,

    I'm writing a Spring MVC application and I need to encode some of my Java objects into JSON.

    The last time I've encoded anything in JSON was when I was using PHP and was spoiled by having the json_encode function.

    Is there anything this simple in Java? If not, what are the popular libraries for JSON encoding?

    Thanks,
    Brandon

  • #2
    Hello,

    have you tried this: http://www.json.org/java/ .
    Personnaly, from now I only used my custom methods to perfom the JSON formatting with only a StringBuffer and defining my own methods.

    Comment


    • #3
      Have you looked at Spring json?

      http://spring-json.sourceforge.net/index.html it supports json-lib which seems to be commonly used and some other json library sojo.

      Comment

      Working...
      X