Got rid of an unneeded method.

This commit is contained in:
Inderjeet Singh 2011-03-29 21:38:08 +00:00
parent f718784f33
commit 523f489863

View File

@ -46,20 +46,16 @@ final class JsonSerializationContextDefault implements JsonSerializationContext
if (src == null) {
return JsonNull.createJsonNull();
}
return serialize(src, src.getClass(), true);
return serialize(src, src.getClass());
}
public JsonElement serialize(Object src, Type typeOfSrc) {
if (src == null) {
return JsonNull.createJsonNull();
}
return serialize(src, typeOfSrc, true);
}
JsonElement serialize(Object src, Type typeOfSrc, boolean preserveType) {
JsonSerializationVisitor visitor = new JsonSerializationVisitor(
objectNavigator, fieldNamingPolicy, serializeNulls, serializers, this, ancestors);
objectNavigator.accept(new ObjectTypePair(src, typeOfSrc, preserveType), visitor);
objectNavigator.accept(new ObjectTypePair(src, typeOfSrc, true), visitor);
return visitor.getJsonElement();
}
}