From f75572f9cc9a418f22babfea6ade23cee5241c22 Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Fri, 15 Nov 2024 16:16:53 +0100 Subject: [PATCH] Fix README example --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index f772415..35037ad 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Syntax Examples: ```java // Assert that a root property is equal to a string -JsonAssert.assertThat("myprop").isEqualTo("foo"); +JsonAssert.assertThat(JSON).field("myprop").isEqualTo("foo"); // Assert that the traversed path exists and the property is larger than two JsonAssert.assertThat(JSON).path("a", "b", "c").isEqualTo(2); @@ -37,9 +37,6 @@ JsonAssert.assertThat(JSON).asArray().first().field("prop").isEqualTo(1); // Assert matrix [[1,2],[3,4]] assertThat(JSON).asArray().last().asArray().first().asInteger().isEqualTo(3); - - - ``` For more examples see the unit tests in [unit tests](src/test/java/com/devsoap/json).