开发者社区 问答 正文

JSONPath.read在2.0.x版本不再支持

在fastjson-1.2.7x以上版本时,取对象的值可用 JSONPath.read(jsonString, jsonPath);读取jsonString在jsonPath路径的值,也可以用JSONPath.eval(jsonObject, jsonPath);读取jsonObject在jsonPath路径的值。 fastjson-2.0.x把JSONPath.read方法去掉了,请问,用什么方法可以替代 JSONPath.read(jsonString, jsonPath);的方法?

原提问者GitHub用户microver

展开
收起
飘飘斯嘉丽 2023-04-21 12:02:14 236 分享 版权
1 条回答
写回答
取消 提交回答
  • JSONPath.extract方法

    原回答者GitHub用户wenshao

    2023-04-21 14:41:10
    赞同 展开评论
问答地址: