question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JSON matcher *any-object* is misinterpreted

See original GitHub issue

Hi there, thanks for your work! I am using JSON matchers extensively in my application and I realised that in 2 HTTP responses with exactly the same JSON object (within another object), in a test I can match it with *any-object*, but in another test, I have to fully describe it.

In both tests i am using “Then assert body.is(…)”

The failing test tells me: “matcher any-string (checks if the field is a String) failed for input (…)”

I have tried to match with object, so why the test fails to match with string ?

This wouldn’t be so weird if it never worked, but as i said, i works in another test, that tests exactly the same object. Any help would be very much appreciated

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
seugnimodcommented, Sep 19, 2022

Actually, we have a fork of play 2.5 and that wouldn’t work for us. I have to push the Core team to get up to date with that, and also with the version of your lib, cause we use currently the 0.19.3, but I want all the recent goodies 😃

1reaction
agourlaycommented, Jul 19, 2022

Thanks, I think I have an idea 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

InvalidUseOfMatchersException when using Matchers.eq ...
This exception may occur if matchers are combined with raw values: //incorrect: someMethod(anyObject(), "raw String"); When using matchers, all ...
Read more >
JsonConvert.DeserializeObject Problem when use for generic types!
I'm using this code to deserialize my json data to list of objects as follow : ... i want to use in generic...
Read more >
Converting a Dictionary to JSON #133 - bignerdranch/Freddy
Is there a easy way to convert a dictionary (i.e of type [String : String], [String, AnyObject],...) without writing all this boiler plate?...
Read more >
ArgumentMatchers (Mockito 2.6.2 API) - javadoc.io
Matches any object of given type, excluding nulls. This matcher will perform a type check with the given type, thus excluding values. See...
Read more >
ECMA-262 Edition 5.1 - ECMAScript Language Specification
primitive value that represents the intentional absence of any object value ... The JSON grammar is used to translate a String describing a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found