public class DefaultJSONParserTest_date extends TestCase {
public void test_date() {
String text = "{\"date\":\"2011-01-09T13:49:53.254\"}";
char[] chars = text.toCharArray();
DefaultJSONParser parser = new DefaultJSONParser(chars, chars.length, ParserConfig.getGlobalInstance(), 0);
parser.config(Feature.AllowISO8601DateFormat, true);
JSONObject json = parser.parseObject();
Assert.assertEquals(new Date(1294552193254L), json.get("date"));
}