import com.jfspme.JSONParser;
import com.jfspme.JSONObject;
import com.jfspme.JSONException;
public class JsonParserExample {
public static void main(String[] args) {
String json = "{ \"name\" : \"John\", \"age\" : 30 }";
try {
JSONParser parser = new JSONParser();
JSONObject obj = (JSONObject) parser.parse(json);
String name = (String) obj.get("name");
int age = ((Long) obj.get("age")).intValue();
System.out.println("Name: " + name);
System.out.println("Age: " + age);
} catch (JSONException e) {
e.printStackTrace();
}
}
}