You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2010/08/16 00:51:38 UTC

svn commit: r985770 - /pivot/trunk/core/src/org/apache/pivot/json/JSONSerializer.java

Author: tvolkert
Date: Sun Aug 15 22:51:37 2010
New Revision: 985770

URL: http://svn.apache.org/viewvc?rev=985770&view=rev
Log:
PIVOT-521 :: Add support for parameterized types in constructor for JSON bean binding

Modified:
    pivot/trunk/core/src/org/apache/pivot/json/JSONSerializer.java

Modified: pivot/trunk/core/src/org/apache/pivot/json/JSONSerializer.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/json/JSONSerializer.java?rev=985770&r1=985769&r2=985770&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/json/JSONSerializer.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/json/JSONSerializer.java Sun Aug 15 22:51:37 2010
@@ -50,7 +50,7 @@ import org.apache.pivot.serialization.Se
  */
 public class JSONSerializer implements Serializer<Object> {
     private Charset charset;
-    private Class<?> type;
+    private Type type;
 
     private int c = -1;
     private boolean alwaysDelimitMapKeys = false;
@@ -69,11 +69,11 @@ public class JSONSerializer implements S
         this(charset, Object.class);
     }
 
-    public JSONSerializer(Class<?> type) {
+    public JSONSerializer(Type type) {
         this(Charset.forName(DEFAULT_CHARSET_NAME), type);
     }
 
-    public JSONSerializer(Charset charset, Class<?> type) {
+    public JSONSerializer(Charset charset, Type type) {
         if (charset == null) {
             throw new IllegalArgumentException("charset is null.");
         }
@@ -92,7 +92,7 @@ public class JSONSerializer implements S
     /**
      * Returns the type of the object that will be returned by {@link #readObject(Reader)}.
      */
-    public Class<?> getType() {
+    public Type getType() {
         return type;
     }