Git Product home page Git Product logo

jsonmatcher's People

Watchers

James Cloos avatar

jsonmatcher's Issues

Set scope of hamcrest-library to test.

hamcrest-library is only needed for the tests. Therefore it should have test 
scope only.


Original issue reported on code.google.com by StefanFriedrichBirkner on 4 Sep 2013 at 7:18

Attachments:

JsonPathNodeArrayOfObjects.verifyThatArrayIndexIsSpecifiedCorrectly

{{{
// start with [ contains a number in between and ends with ]
nodeKey.matches("^\\[\\d+\\]$") &&
// starts with "[0" but is not "[0]" e.g. 0123 is not valid.
// *TODO collapse these two conditions into one with a
// neatly compiled REGEX.*
nodeKey.startsWith("[0") && nodeKey.equals("[0]"),
}}}

Original issue reported on code.google.com by [email protected] on 30 Jun 2011 at 7:34

* Star operator in JSON paths

What steps will reproduce the problem?
  JSONObject json = new JSONObject(JSON_STRING_FOR_PATH_TEST);
  assertThat(json, JsonMatchers.hasJsonPath("json1.json2.json3[0].field")); // SUCCES 

  assertThat(json, JsonMatchers.hasJsonPath("json1.json2.json3[*].field")); // Fails because of '*'


What is the expected output? What do you see instead?
Expected: assert suceeds
Actual: java.lang.IllegalArgumentException: [*] is not a valid array index for 
a JSON array

What version of the product are you using? On what operating system?
version 1.0-SNAPSHOT, sun jvm 1.7 64bit, linux (Ubuntu)


Please provide any additional information below.
It would be great if jsonmatcher supports JSONPath expressions as described in 
http://goessner.net/articles/JsonPath/


Original issue reported on code.google.com by [email protected] on 7 Mar 2013 at 5:55

Use hamcrest-core instead of hamcrest-all

The current code uses hamcrest-all instead of hamcrest-core. hamcrest-all is a 
single jar, which assembles all the classes of hamcrest-core and 
hamcrest-library. Unfortunately JUnit 4.11 dependends on hamcrest-core. This 
causes classpath problems.

Therefore I changed the dependency of jsonmatcher from hamcrest-all to 
hamcrest-core. In order to avoid compilation problems I upgraded the version to 
1.3, too.


Original issue reported on code.google.com by StefanFriedrichBirkner on 2 Sep 2013 at 8:29

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.