Fixed bugs in JSON serializer

This commit is contained in:
Ziver Koc 2013-07-30 15:13:53 +00:00
parent 9e4178cc08
commit 312d63af28
3 changed files with 107 additions and 41 deletions

View file

@ -120,7 +120,7 @@ public class JSONObjectOutputStream extends OutputStream implements ObjectOutput
field.setAccessible(true);
// Add basic type (int, float...)
if(field.getType().isPrimitive() ||
field.getType() == String.class){
String.class.isAssignableFrom(field.getType())){
root.set(field.getName(), field.get(obj).toString());
}
// Add an array