1.将json解析为map
1.1解析对个对象:

        String itemImages = goodsDesc.getItemImages();
        List<Map> maps = JSON.parseArray(itemImages, Map.class);
1.2解析单个对象:
        String spec = item.getSpec();
        Map specMap = JSON.parseObject(spec, Map.class);

2.将对象转换为json字符串

        String jsonStr = JSON.toJSONString(cartList);

相关文章:

  • 2022-01-31
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2021-06-28
  • 2021-12-09
  • 2022-02-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2021-07-14
相关资源
相似解决方案