mirror of
https://github.com/alibaba/fastjson.git
synced 2026-10-22 01:06:23 +08:00
JSONReader add type reference support
This commit is contained in:
@@ -179,6 +179,10 @@ public class JSONReader implements Closeable {
|
||||
|
||||
return TypeUtils.castToString(object);
|
||||
}
|
||||
|
||||
public <T> T readObject(TypeReference<T> typeRef) {
|
||||
return readObject(typeRef.getType());
|
||||
}
|
||||
|
||||
public <T> T readObject(Type type) {
|
||||
if (context == null) {
|
||||
|
||||
Reference in New Issue
Block a user