com.alibaba.fastjson.JSON



API Populatity

11 Client projects

Project: com.alibaba

Project alibaba/druid in file ...alibaba.druid.bvt.proxy.filter.StatFilterTest.java (2011-06-27)
@@ -12,6 +12,7 @@ import junit.framework.Assert;
 import junit.framework.TestCase;
 
 import com.alibaba.druid.stat.JdbcStatManager;
+import com.alibaba.fastjson.JSON;
 
 public class StatFilterTest extends TestCase {
 
@@ -45,5 +46,7 @@ public class StatFilterTest extends TestCase {
             Assert.assertEquals(url, (String) row.get("URL"));
             Assert.assertEquals(0, row.get("Count_50000_more"));
         }
+        
+        System.out.println(JSON.toJSONString(sqlList));
     }
 }
Project alibaba/fastjson in file ...fastjson.parser.deserializer.DateDeserializer.java (2011-12-17)
@@ -4,7 +4,6 @@ import java.lang.reflect.Type;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONException;
 import com.alibaba.fastjson.parser.DefaultJSONParser;
 import com.alibaba.fastjson.parser.JSONScanner;
@@ -37,7 +36,7 @@ public class DateDeserializer implements ObjectDeserializer {
                 return (T) dateLexer.getCalendar().getTime();
             }
             
-            SimpleDateFormat dateFormat = new SimpleDateFormat(JSON.DEFFAULT_DATE_FORMAT);
+            SimpleDateFormat dateFormat = new SimpleDateFormat(parser.getDateFomrat());
             try {
                 return (T) dateFormat.parse(strVal);
             } catch (ParseException e) {
Project alibaba/fastjson in file ...tjson.parser.deserializer.SqlDateDeserializer.java (2011-12-17)
@@ -5,7 +5,6 @@ import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONException;
 import com.alibaba.fastjson.parser.DefaultJSONParser;
 import com.alibaba.fastjson.parser.JSONScanner;
@@ -71,7 +70,7 @@ public class SqlDateDeserializer implements ObjectDeserializer {
                 longVal = dateLexer.getCalendar().getTimeInMillis();
             } else {
 
-                SimpleDateFormat dateFormat = new SimpleDateFormat(JSON.DEFFAULT_DATE_FORMAT);
+                SimpleDateFormat dateFormat = new SimpleDateFormat(parser.getDateFomrat());
                 try {
                     java.util.Date date = (java.util.Date) dateFormat.parse(strVal);
                     return (T) new java.sql.Date(date.getTime());