You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
530 B
27 lines
530 B
package com.jayway.jsonpath; |
|
|
|
import org.junit.Test; |
|
|
|
import static junit.framework.Assert.assertNull; |
|
|
|
/** |
|
* Created by IntelliJ IDEA. |
|
* User: kallestenflo |
|
* Date: 2/29/12 |
|
* Time: 8:42 AM |
|
*/ |
|
public class IssuesTest { |
|
@Test |
|
public void issue_7() throws Exception { |
|
|
|
String json = "{ \"foo\" : [\n" + |
|
" { \"id\": 1 }, \n" + |
|
" { \"id\": 2 }, \n" + |
|
" { \"id\": 3 }\n" + |
|
" ] }"; |
|
|
|
|
|
assertNull(JsonPath.read(json, "$.foo.id")); |
|
} |
|
|
|
}
|
|
|