v1.3.4
This commit is contained in:
parent
cb58d3c7e6
commit
66e6a90a81
|
@ -64,7 +64,7 @@ public class SerializeHelper {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Object deserializeValue = deserializeValue(field, field.getType(), value);
|
Object deserializeValue = deserializeValue(field, field.getType(), value);
|
||||||
field.set(instance, deserializeValue);
|
ReflectionUtil.setFieldUsingUnsafe(field, instance, deserializeValue);
|
||||||
}
|
}
|
||||||
return instance;
|
return instance;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -116,8 +116,9 @@ public class SerializeHelper {
|
||||||
map.put(key, deserializeValue(field, valueType, jsonObject.get(key)));
|
map.put(key, deserializeValue(field, valueType, jsonObject.get(key)));
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
|
} else {
|
||||||
|
return deserialize(clazz, (JSONObject) value);
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Object serializeValue(Object value) throws SerializeException {
|
private static Object serializeValue(Object value) throws SerializeException {
|
||||||
|
@ -159,8 +160,9 @@ public class SerializeHelper {
|
||||||
jsonObject.put(key.toString(), serializeValue(map.get(key)));
|
jsonObject.put(key.toString(), serializeValue(map.get(key)));
|
||||||
}
|
}
|
||||||
return jsonObject;
|
return jsonObject;
|
||||||
|
} else {
|
||||||
|
return serialize(value);
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Map<Class<?>, Class<?>> WRAPPER_TO_PRIMITIVE = new HashMap<>();
|
public static final Map<Class<?>, Class<?>> WRAPPER_TO_PRIMITIVE = new HashMap<>();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name: AuLib
|
name: AuLib
|
||||||
main: com.io.yutian.aulib.AuLib
|
main: com.io.yutian.aulib.AuLib
|
||||||
version: 1.3.2
|
version: 1.3.4
|
||||||
author: SuperYuTian
|
author: SuperYuTian
|
Loading…
Reference in New Issue
Block a user