JsonHandler implements Serializable { public Object parse(String str) { Object ret = deserializer.deserialize(str); return ret; } JsonHandler(); static JsonHandler instance(); JSONDeserializer<Object> getDeserializer(); JSONSerializer getSerializer(); String format(Object obj); void format(Object obj, Writer writer); Object parse(String str); @SuppressWarnings("unchecked") T parse(String str, Class<T> clazz); void setPrettyPrint(boolean prettyPrint);  }
@Test public void testParseBasics() { assertEquals(null, handler.parse("null")); assertEquals(true, handler.parse("true")); assertEquals(false, handler.parse("false")); assertEquals("my string", handler.parse("'my string'")); assertEquals("null", handler.parse("'null'")); assertEquals("true", handler.parse("'true'")); assertEquals(2, handler.parse("2")); assertEquals(2.4, handler.parse("2.4")); assertEquals("", handler.parse("''")); }