Convert Java object to JSON string

ht‮ww//:spt‬w.lautturi.com
Convert Java object to JSON string
class Employee{
	public Employee(String string, int i) {
		name = string;
		age = i;
	}
	String name;
	int age;
}

Employee emp = new Employee("Alice",22);
String empString = JSONObject.toJSONString(emp);
Created Time:2017-09-06 07:06:12  Author:lautturi