我想为列表中的每个JSON节点保存JSON路径
我看到了这个教程: How do I get a list of all JSON paths to values from a JSON String? ,
但我无法理解&执行它
请帮忙..
代码:
$.shopper.Id
$.shopper.Context.CollapseOrderItems
$.shopper.Context.IsTest
$.SelfIdentifiersData[0].SelfIdentifierData.SelfIdentifierType.SelfIdentifierType
$.SelfIdentifiersData[1].SelfIdentifierData.SelfIdentifierType.SelfIdentifierType
预期产出:
Exception in thread "main" java.lang.NoClassDefFoundError: net/minidev/json/writer/JsonReaderI
at com.jayway.jsonpath.internal.DefaultsImpl.<init>(DefaultsImpl.java:17)
at com.jayway.jsonpath.internal.DefaultsImpl.<clinit>(DefaultsImpl.java:15)
at com.jayway.jsonpath.Configuration.getEffectiveDefaults(Configuration.java:53)
at com.jayway.jsonpath.Configuration.defaultConfiguration(Configuration.java:178)
at com.json.JsonPathCreator.main(JsonPathCreator.java:17)
Caused by: java.lang.ClassNotFoundException: net.minidev.json.writer.JsonReaderI
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 5 more
例外追踪:
public static MyApplication instances;
@Override public void onCreate() {
super.onCreate();
instances = this;
}
public static MyApplication getInstances(){
return instances;
}