OSDN Git Service

Fixed 1454.
authorNathanSweet <nathan.sweet@gmail.com>
Mon, 27 May 2013 16:44:52 +0000 (18:44 +0200)
committerNathanSweet <nathan.sweet@gmail.com>
Mon, 27 May 2013 16:44:52 +0000 (18:44 +0200)
gdx/src/com/badlogic/gdx/utils/Json.java

index c82366c..67c6273 100644 (file)
@@ -43,7 +43,7 @@ import java.util.Map;
  * https://code.google.com/p/libgdx/wiki/JsonParsing\r
  * @author Nathan Sweet */\r
 public class Json {\r
-       private static final boolean debug = false;\r
+       private static final boolean debug = true;\r
 \r
        private JsonWriter writer;\r
        private String typeName = "class";\r
@@ -428,7 +428,7 @@ public class Json {
                        }\r
 \r
                        if (value instanceof Array) {\r
-                               if (knownType != null && actualType != knownType)\r
+                               if (knownType != null && actualType != knownType && actualType != Array.class)\r
                                        throw new SerializationException("Serialization of an Array other than the known type is not supported.\n"\r
                                                + "Known type: " + knownType + "\nActual type: " + actualType);\r
                                writeArrayStart();\r