lukas-krecan / JsonUnit

Compare JSON in your Unit Tests
Apache License 2.0
879 stars 115 forks source link

Mark JSON-containing paramaters with @Language("JSON") #672

Closed foaw closed 10 months ago

foaw commented 10 months ago

Is your feature request related to a problem? Please describe. When calling assertThatJson and passing a j.l.String, it could be specified as such for IntelliJ IDEA. This will enable in-place validation of JSON, enable highlighting, allow opening the fragment in a separate tab, sorting, etc.

Describe the solution you'd like Since the project already uses JetBrains Annotations, it only remains to mark the parameters with @Language("JSON").

Describe alternatives you've considered.

Additional context The parameter type has to be j.l.String, so an overloaded method will have to be introduced.

lukas-krecan commented 10 months ago

Hi, tha fact that the parameter has to be a String makes it unfeasible. I will not be willing to overload all the methods that accept Object with a String variant just to get better IDE support. The cost is too high for the expected gain. Sorry