Fixed bugs in JSON serializer
This commit is contained in:
parent
9e4178cc08
commit
312d63af28
3 changed files with 107 additions and 41 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue