代码 Object jsonObject = JSON.parse("{\"path\":\"\"}"); Object readResult = JSONPath.compile("$.path.docExt.a").eval(jsonObject);
错误 Exception in thread "main" java.lang.NullPointerException at com.alibaba.fastjson.JSONPath.getPropertyValue(JSONPath.java:3868) at com.alibaba.fastjson.JSONPath$PropertySegment.eval(JSONPath.java:2354) at com.alibaba.fastjson.JSONPath.eval(JSONPath.java:121)
源码: 这个地方是否需要增加判空 https://github.com/alibaba/fastjson/blob/7abc84fc2c208f148970ca854f2f6a59466e47ae/src/main/java/com/alibaba/fastjson/JSONPath.java#L3868