Challenge 1 rest-assured

Cách nhanh nhất là sử dụng thư viện JsonPath (com.jayway.jsonpath.JsonPath)

Pom.xml

<dependency>
    <groupId>com.jayway.jsonpath</groupId>
    <artifactId>json-path</artifactId>
    <version>2.6.0</version>
</dependency>
String res = "[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]";
List<Object> list = JsonPath.read(res, "$[*]");
System.out.println(list.size());
//25
0 0 votes
Đánh giá challenge
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments