Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Parser not able to parse numbers into double or float #68

Closed
johanhaleby opened this issue Jul 20, 2015 · 0 comments
Closed

JSON Parser not able to parse numbers into double or float #68

johanhaleby opened this issue Jul 20, 2015 · 0 comments

Comments

@johanhaleby
Copy link
Collaborator

What steps will reproduce the problem?
1. HTTP service returns body {"number": 0.0}
2. trying to match this with then().body("number", Matchers.closeTo(0.0, 0.001))

What is the expected output? What do you see instead?
Expect the match to succeed, fails instead with error message

java.lang.AssertionError: JSON path number doesn't match.
Expected: a numeric value within <0.001> of <0.0>
  Actual: 0.0

What version of the product are you using? On what operating system?
OS: Mac OS X 10.10.4, Product Version: 2.4.1 from maven repository

Attached is a minimal working example project.

Original issue reported on code.google.com by s.suerb...@googlemail.com on 16 Jul 2015 at 4:18

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant