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.
28 lines
530 B
28 lines
530 B
13 years ago
|
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
|
||
|
*/
|
||
13 years ago
|
public class IssuesTest {
|
||
13 years ago
|
@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"));
|
||
|
}
|
||
|
|
||
|
}
|