Update json data
This commit is contained in:
parent
8ebe69f176
commit
36eacfb3c3
|
@ -1,21 +1,23 @@
|
|||
{
|
||||
"items": {
|
||||
"book": [
|
||||
{
|
||||
"author": "Arthur Conan Doyle",
|
||||
"title": "Sherlock Holmes",
|
||||
"price": 8.99
|
||||
},
|
||||
{
|
||||
"author": "J. R. R. Tolkien",
|
||||
"title": "The Lord of the Rings",
|
||||
"isbn": "0-395-19395-8",
|
||||
"price": 22.99
|
||||
}
|
||||
],
|
||||
"bicycle": {
|
||||
"color": "red",
|
||||
"price": 19.95
|
||||
}
|
||||
}
|
||||
}
|
||||
"items":{
|
||||
"book":[
|
||||
{
|
||||
"author":"Arthur Conan Doyle",
|
||||
"title":"Sherlock Holmes",
|
||||
"price":8.99
|
||||
},
|
||||
{
|
||||
"author":"J. R. R. Tolkien",
|
||||
"title":"The Lord of the Rings",
|
||||
"isbn":"0-395-19395-8",
|
||||
"price":22.99
|
||||
}
|
||||
],
|
||||
"bicycle":{
|
||||
"color":"red",
|
||||
"price":19.95
|
||||
}
|
||||
},
|
||||
"url":"mystore.com",
|
||||
"owner":"baeldung"
|
||||
}
|
|
@ -33,7 +33,7 @@ public class JsonPathUnitTest {
|
|||
@Test
|
||||
public void shouldMatchCountOfObjects() {
|
||||
Map<String, String> objectMap = JsonPath.read(json, "$");
|
||||
assertEquals(1, objectMap.keySet()
|
||||
assertEquals(3, objectMap.keySet()
|
||||
.size());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue