You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
When the json "null" is sent in the request body, an exception is thrown in org.mockserver.matchers.JsonStringMatcher#matches org.json.JSONException: Unparsable JSON string: null.
This means I am unable to match an expectation when the body is the json "null".
What you are trying to do
Set up an expectation in mock server with "null" as the body, content type json.
Try to match this expectation by making a request to mock server with "null" as the body. The content type should be json.
MockServer version
5.9.1-SNAPSHOT
To Reproduce
Steps to reproduce the issue:
Set up an expectation in mock server with "null" as the body, content type json.
Try to match this expectation by making a request to mock server with "null" as the body. The content type should be json. org.json.JSONException: Unparsable JSON string: null at org.mockserver.matchers.JsonStringMatcher#matches
Describe the issue
When the json "null" is sent in the request body, an exception is thrown in
org.mockserver.matchers.JsonStringMatcher#matches
org.json.JSONException: Unparsable JSON string: null
.This means I am unable to match an expectation when the body is the json "null".
I think the problem is in the JSONAssert library
skyscreamer/JSONassert#83
What you are trying to do
Set up an expectation in mock server with "null" as the body, content type json.
Try to match this expectation by making a request to mock server with "null" as the body. The content type should be json.
MockServer version
5.9.1-SNAPSHOT
To Reproduce
Steps to reproduce the issue:
org.json.JSONException: Unparsable JSON string: null
atorg.mockserver.matchers.JsonStringMatcher#matches
Expected behaviour
"null" should be allowed as valid json, as discussed here https://stackoverflow.com/questions/8526995/is-null-valid-json-4-bytes-nothing-else.
MockServer Log
The text was updated successfully, but these errors were encountered: