public static void main(String args[]) throws Exception {
ClassLoader classLoader = JsonParser.class.getClassLoader();
String json = "{\"value\" : \"abcdef\\\"����\"}";
StringReader reader = new StringReader(json);
JsonParser parser = new JsonParser(reader, StringObj.class, classLoader);
parser.process();
System.out.println(parser.getObject().toString());
json = "{\"value1\" : 10,\n\"value2\":-10E6}";
reader = new StringReader(json);
parser = new JsonParser(reader, null, classLoader);
parser.process();
System.out.println(parser.getObject());
json = "{\"value\" : true}";
reader = new StringReader(json);
parser = new JsonParser(reader, BooleanObj.class, classLoader);
parser.process();
System.out.println(parser.getObject());
json = "[\"alpha\",\"beta\",\"gamma\"]";
reader = new StringReader(json);
parser = new JsonParser(reader, null, classLoader);
parser.process();
System.out.println(parser.getObject());
reader = new StringReader(json);
parser = new JsonParser(reader, String[].class, classLoader);
parser.process();
System.out.println(Arrays.asList((String[]) parser.getObject()));
json = "{\"myArray\":[{\"value\":\"0\"},{\"value\":\"1\"},{\"value\":\"2\"}]}";
reader = new StringReader(json);
parser = new JsonParser(reader, ComplexArrayObj.class, classLoader);
parser.process();
System.out.println(parser.getObject());
}