例:
Object object = {name:“张三”,age:23}
代码实现:

Map entity = (Map)object;
//获取object中name的值:
String name = entity.get("name").toString();
//获取object中age的值
int age = Integer.valueOf(entity.get("age"));
Logo

学大模型,用大模型上飞桨星河社区!每天8点V100G算力免费领!免费领取ERNIE 4.0 100w Token >>>

更多推荐