JSON Parser -java.lang.NoSuchFieldError: defaultReader

Stumbled about the same problem. The reason why it does not work is not the JDK 8. The reason why you encounter this issue, is the fact that weblogic 12.2.1.X is bundling some old version of json-smart. On my machine this would be found here: jar:file:/C:/dev/WLS_12_2_1_2_0/oracle_common/modules/net.minidev.json-smart.jar!/net/minidev/json/JSONValue.class Now if you are using a library like json-path … Read more

Basic use of JSONPath in Java

Java JsonPath API found at jayway JsonPath might have changed a little since all the above answers/comments. Documentation too. Just follow the above link and read that README.md, it contains some very clear usage documentation IMO. Basically, as of current latest version 2.2.0 of the library, there are a few different ways of achieving what’s … Read more

Json.NET JSONPath query not returning expected results

Json.NET’s JSONPath parser allows the filter (script) expression [?( )] to query for nested properties inside child objects of the candidate array item(s). Thus var test = json.SelectTokens(@”$.projects[?(@.client.code == ‘DEF’)].client”); returns, as desired, [ { “code”: “DEF”, “name”: “Client 2” } ] Working .Net fiddle. Upon experimentation it seems none of the JSONPath implementations at … Read more