Flexjson is a lightweight java library for serializing and de-serializing
java beans, maps, arrays and collections in JSON format.
Get the latest binaries from
https://sourceforge.net/projects/flexjson/.
This requires the library flexjson-2.1.jar to be in classpath.
The following example shows how to serialize a List of Java Objects.
JSONSerializer serializer = new JSONSerializer().prettyPrint(true);
Student stud = new Student("Sriram", "Kasireddi", 2, "Singing", new Date());
Student stud2 = new Student("Sudhakar", "Kasireddi", 29, "Painting", new Date());
Student stud3 = new Student("Anu", "Kasireddi", 29, "Cooking", new Date());
List<Student> students = Arrays.asList(stud, stud2, stud3);