Skip to content

Commit 36eacfb

Browse files
psysanepsysane
authored andcommitted
Update json data
1 parent 8ebe69f commit 36eacfb

2 files changed

Lines changed: 23 additions & 21 deletions

File tree

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
{
2-
"items": {
3-
"book": [
4-
{
5-
"author": "Arthur Conan Doyle",
6-
"title": "Sherlock Holmes",
7-
"price": 8.99
8-
},
9-
{
10-
"author": "J. R. R. Tolkien",
11-
"title": "The Lord of the Rings",
12-
"isbn": "0-395-19395-8",
13-
"price": 22.99
14-
}
15-
],
16-
"bicycle": {
17-
"color": "red",
18-
"price": 19.95
19-
}
20-
}
21-
}
2+
"items":{
3+
"book":[
4+
{
5+
"author":"Arthur Conan Doyle",
6+
"title":"Sherlock Holmes",
7+
"price":8.99
8+
},
9+
{
10+
"author":"J. R. R. Tolkien",
11+
"title":"The Lord of the Rings",
12+
"isbn":"0-395-19395-8",
13+
"price":22.99
14+
}
15+
],
16+
"bicycle":{
17+
"color":"red",
18+
"price":19.95
19+
}
20+
},
21+
"url":"mystore.com",
22+
"owner":"baeldung"
23+
}

‎json-path/src/test/java/com/baeldung/jsonpath/introduction/JsonPathUnitTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static void init() throws IOException {
3333
@Test
3434
public void shouldMatchCountOfObjects() {
3535
Map<String, String> objectMap = JsonPath.read(json, "$");
36-
assertEquals(1, objectMap.keySet()
36+
assertEquals(3, objectMap.keySet()
3737
.size());
3838
}
3939

0 commit comments

Comments
 (0)