Browse Source

Update README.md

pull/56/head
kallestenflo 11 years ago
parent
commit
a4e1b655f9
  1. 7
      README.md

7
README.md

@ -232,7 +232,7 @@ PATH vs VALUE
As specified in the Goessner implementation a JsonPath can return either `Path` or `Value`. `Value` is the default and what all the exaples above are reuturning. If you rather have the path of the elements our query is hitting this can be acheived with an option. As specified in the Goessner implementation a JsonPath can return either `Path` or `Value`. `Value` is the default and what all the exaples above are reuturning. If you rather have the path of the elements our query is hitting this can be acheived with an option.
```java ```java
Configuration conf = Configuration.builder().options(AS_PATH_LIST).build(); Configuration conf = Configuration.builder().options(Option.AS_PATH_LIST).build();
List<String> pathList = using(conf).parse(JSON_DOCUMENT).read("$..author"); List<String> pathList = using(conf).parse(JSON_DOCUMENT).read("$..author");
@ -253,8 +253,7 @@ JsonPath is shipped with three different JsonProviders:
* [JacksonJsonProvider](https://github.com/FasterXML/jackson) * [JacksonJsonProvider](https://github.com/FasterXML/jackson)
* [GsonJsonProvider](https://code.google.com/p/google-gson/) (experimental) * [GsonJsonProvider](https://code.google.com/p/google-gson/) (experimental)
Changing the configuration defaults as demonstrated should only be done when your application is being initialized. Changes during runtime is strongly discouraged, especially in amulti threaded application.
Note that the JacksonJsonProvider requires `com.fasterxml.jackson.core:jackson-databind:2.4.1.3` and the GsonJsonProvider requires `com.google.code.gson:gson:2.3` on your classpath.
```java ```java
Configuration.setDefaults(new Configuration.Defaults() { Configuration.setDefaults(new Configuration.Defaults() {
@ -278,6 +277,8 @@ Configuration.setDefaults(new Configuration.Defaults() {
}); });
``` ```
Note that the JacksonJsonProvider requires `com.fasterxml.jackson.core:jackson-databind:2.4.1.3` and the GsonJsonProvider requires `com.google.code.gson:gson:2.3` on your classpath.
Binaries Binaries
-------- --------

Loading…
Cancel
Save