Browse Source

Merge pull request #574 from JBertaux/master

Add a part in the readme describing how to set a value
pull/624/head
kallestenflo 4 years ago committed by GitHub
parent
commit
512a35c171
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      README.md

10
README.md

@ -340,6 +340,15 @@ assertThat(pathList).containsExactly(
"$['store']['book'][3]['author']");
```
Set a value
-----------
The library offers the possibility to set a value.
```java
String newJson = JsonPath.parse(json).set("$['store']['book'][0]['author']", "Paul").jsonString();
```
Tweaking Configuration
----------------------
@ -469,4 +478,3 @@ CacheProvider.setCache(new Cache() {
[![Analytics](https://ga-beacon.appspot.com/UA-54945131-1/jsonpath/index)](https://github.com/igrigorik/ga-beacon)

Loading…
Cancel
Save