You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
抛出异常
Exception in thread "main" com.alibaba.fastjson.JSONPathException: illeal jsonpath syntax. $..a
at com.alibaba.fastjson.JSONPath$JSONPathParser.readName(JSONPath.java:826)
at com.alibaba.fastjson.JSONPath$JSONPathParser.readSegement(JSONPath.java:356)
at com.alibaba.fastjson.JSONPath$JSONPathParser.explain(JSONPath.java:889)
at com.alibaba.fastjson.JSONPath.init(JSONPath.java:66)
at com.alibaba.fastjson.JSONPath.eval(JSONPath.java:75)
at com.alibaba.fastjson.JSONPath.eval(JSONPath.java:251)
at com.apidocs.test.test.main(test.java:65)
The text was updated successfully, but these errors were encountered:
------------------ Original ------------------
From: "高铁"<notifications@github.com>;
Date: Tue, May 2, 2017 11:52 PM
To: "alibaba/fastjson"<fastjson@noreply.github.com>;
Cc: "l99xl"<lex@l99.com>; "Author"<author@noreply.github.com>;
Subject: Re: [alibaba/fastjson] JSONPath "deepScan属性访问,例如$..name" 抛出异常 (#1177)
我刚测试过,新版本是好的,升级到最新版吧 https://github.com/alibaba/fastjson/releases/tag/1.2.31
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
使用1.2.8版本,main方法中执行以下代码:
String text = "{\"a\":{\"b\":\"c\",\"g\":{\"e\":\"f\"}},\"d\":{\"a\":\"f\",\"h\":[\"s1\"]}} "; JSONObject jsonObject = JSONObject.parseObject(text); Object eval = JSONPath.eval(jsonObject, "$..a");
抛出异常
Exception in thread "main" com.alibaba.fastjson.JSONPathException: illeal jsonpath syntax. $..a
at com.alibaba.fastjson.JSONPath$JSONPathParser.readName(JSONPath.java:826)
at com.alibaba.fastjson.JSONPath$JSONPathParser.readSegement(JSONPath.java:356)
at com.alibaba.fastjson.JSONPath$JSONPathParser.explain(JSONPath.java:889)
at com.alibaba.fastjson.JSONPath.init(JSONPath.java:66)
at com.alibaba.fastjson.JSONPath.eval(JSONPath.java:75)
at com.alibaba.fastjson.JSONPath.eval(JSONPath.java:251)
at com.apidocs.test.test.main(test.java:65)
The text was updated successfully, but these errors were encountered: