uniquejava / blog

My notes regarding the vibrating frontend :boom and the plain old java :rofl.
Creative Commons Zero v1.0 Universal
11 stars 5 forks source link

jsonpath #312

Open uniquejava opened 4 years ago

uniquejava commented 4 years ago

README

https://github.com/json-path/JsonPath

pom

<dependency>
    <groupId>com.jayway.jsonpath</groupId>
    <artifactId>json-path</artifactId>
    <version>2.4.0</version>
</dependency>

Hello world

String json = "...";

List<String> authors = JsonPath.read(json, "$.store.book[*].author");

常见path