Serializable -> JsonSerializable
@@ -506,9 +506,9 @@ public class Json{
return;
}
- if(value instanceof Serializable){
+ if(value instanceof JsonSerializable){
writeObjectStart(actualType, knownType);
- ((Serializable)value).write(this);
+ ((JsonSerializable)value).write(this);
writeObjectEnd();
return;
}
@@ -1029,8 +1029,8 @@ public class Json{
Object object = newInstance(type);
- if(object instanceof Serializable){
- ((Serializable)object).read(this, jsonData);
+ if(object instanceof JsonSerializable){
+ ((JsonSerializable)object).read(this, jsonData);
return (T)object;
}
@@ -1091,10 +1091,10 @@ public class Json{
Serializer serializer = classToSerializer.get(type);
if(serializer != null) return (T)serializer.read(this, jsonData, type);
- if(Serializable.class.isAssignableFrom(type)){
+ if(JsonSerializable.class.isAssignableFrom(type)){
// A Serializable may be read as an array, string, etc, even though it will be written as an object.
Object object = newInstance(type);
- ((Serializable)object).read(this, jsonData);
+ ((JsonSerializable)object).read(this, jsonData);
return (T)object;
}
}
@@ -1282,7 +1282,7 @@ public class Json{
T read(Json json, JsonValue jsonData, Class type);
}
- public interface Serializable{
+ public interface JsonSerializable{
void write(Json json);
void read(Json json, JsonValue jsonData);
