<dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>${fastjson.version}</version>
</dependency>
Map<String, Object> map= new HashMap<>();
map.put("name", "tom");
map.put("age", 23);
map.put("sex", "男");
Result result = JSONObject.parseObject(JSONObject.toJSONString(map), Person.class);

 

相关文章:

  • 2021-08-03
  • 2022-12-23
  • 2022-01-19
  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-16
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2021-07-09
  • 2022-12-23
相关资源
相似解决方案