If the request body contains a valid scalar JSON value e.g. string, boolean or int, an InvalidArgumentException is thrown. ### Code to reproduce the issue Using BodyParamsMiddleware with the standard JsonStartegy. Like described here: https://docs.zendframework.com/zend-expressive/v3/features/helpers/body-parse/ Send a request with the Content-Type header 'application/json' and the body containing any of this: * "string" * false * true * 123 ### Expected results Expecting to use `\Psr\Http\Message\ServerRequestInterface::getParsedBody()`. ### Actual results ``` InvalidArgumentException Zend\Diactoros\ServerRequest::withParsedBody expects a null, array, or object argument; received integer ```
If the request body contains a valid scalar JSON value e.g. string, boolean or int, an InvalidArgumentException is thrown.
Code to reproduce the issue
Using BodyParamsMiddleware with the standard JsonStartegy.
Like described here: https://docs.zendframework.com/zend-expressive/v3/features/helpers/body-parse/
Send a request with the Content-Type header 'application/json' and the body containing any of this:
Expected results
Expecting to use
\Psr\Http\Message\ServerRequestInterface::getParsedBody().Actual results