Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解析属性第一位是数字时异常 NumberFormatException #1112

xiushao1024 opened this issue Mar 30, 2017 · 2 comments


None yet
2 participants
Copy link

commented Mar 30, 2017


String path = "$.xiu.\345_xiu";
JsonPath.eval(jsonOgject , path);


@wenshao wenshao added New Feature bug and removed New Feature labels Mar 30, 2017

@wenshao wenshao added this to the 1.2.31 milestone Mar 30, 2017

wenshao added a commit that referenced this issue Apr 1, 2017


This comment has been minimized.

Copy link

commented Apr 3, 2017

@wenshao wenshao closed this Apr 3, 2017


This comment has been minimized.

Copy link

commented May 11, 2017

你好,最近使用JsonPath解析的时候遇到另一个问题。当json 的属性名为数字并且数值过大时(超过integer.max_value),直接使用JsonPath表达式解析报错。

java.lang.NumberFormatException: For input string: "1234567899999"
at java.lang.NumberFormatException.forInputString(
at java.lang.Integer.parseInt(
at java.lang.Integer.parseInt(

public static void main(String[] args) {
String json1 = "{"articles":{"2147483647":{"XXX":"xiu"}}}";
String path1 = "$.articles.2147483647.XXX";
Object read =, path1);

	String json2 = "{\"articles\":{\"2147483648\":{\"XXX\":\"xiu\"}}}";
	String path2 = "$.articles.2147483648.XXX";
	Object read2 =, path2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.