From b3c2df0928f89b2a93e72044b42a6e0582550ddd Mon Sep 17 00:00:00 2001 From: kalle Date: Fri, 15 Jul 2011 13:40:12 +0200 Subject: [PATCH] URL fixed in pom. Added tests --- changelog.txt | 5 +++++ json-path-assert/pom.xml | 2 +- .../src/test/java/com/jayway/jsonassert/JsonAssertTest.java | 4 +++- json-path/pom.xml | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 448c10d4..ddae1a1d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,11 @@ ------------------------------------------ 0.5.5 ------------------------------------------ +- Improved JSON bracket notation. $['store']['book'][*]['author name'] + properties can also contain '.' eg $['store']['book'][*]['author.name'] +------------------------------------------ +0.5.4 +------------------------------------------ - Replaced com.googlecode.json-simple with net.minidev.json-smart - Introduced different parse modes, JsonPath.SLACK_MODE and JsonPath.STRICT_MODE (the slack mode lets you use single quotes or even no quotes at all) diff --git a/json-path-assert/pom.xml b/json-path-assert/pom.xml index df915558..4e57548a 100644 --- a/json-path-assert/pom.xml +++ b/json-path-assert/pom.xml @@ -25,7 +25,7 @@ json-path-assert 0.5.5-SNAPSHOT json-path-assert - http://maven.apache.org + http://code.google.com/p/json-path/ com.jayway.jsonpath diff --git a/json-path-assert/src/test/java/com/jayway/jsonassert/JsonAssertTest.java b/json-path-assert/src/test/java/com/jayway/jsonassert/JsonAssertTest.java index 33256ae7..b527f13b 100644 --- a/json-path-assert/src/test/java/com/jayway/jsonassert/JsonAssertTest.java +++ b/json-path-assert/src/test/java/com/jayway/jsonassert/JsonAssertTest.java @@ -4,7 +4,6 @@ import org.hamcrest.Matchers; import org.junit.Test; import java.io.InputStream; -import java.io.InputStreamReader; import static com.jayway.jsonassert.JsonAssert.*; import static org.hamcrest.Matchers.*; @@ -131,6 +130,9 @@ public class JsonAssertTest { with(JSON).assertEquals("$.store.book[0].title", "Sayings of the Century") .assertThat("$.store.book[0].title", equalTo("Sayings of the Century")); + + with(JSON).assertEquals("$['store']['book'][0].['title']", "Sayings of the Century") + .assertThat("$['store'].book[0].title", equalTo("Sayings of the Century")); } @Test diff --git a/json-path/pom.xml b/json-path/pom.xml index d025ef82..3bd5fe40 100644 --- a/json-path/pom.xml +++ b/json-path/pom.xml @@ -26,7 +26,7 @@ jar 0.5.5-SNAPSHOT json-path - http://maven.apache.org + http://code.google.com/p/json-path/