Skip to content

Commit

Permalink
Unescape json to prevent issues with Java and dotnet clients
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Sep 21, 2022
1 parent 07e2cc7 commit 77bc945
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Renderer/JsonRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public function json(
int $options = 0
): ResponseInterface {
$response = $response->withHeader('Content-Type', 'application/json');
$response->getBody()->write((string)json_encode($data, JSON_PARTIAL_OUTPUT_ON_ERROR | $options));
$response->getBody()->write(
(string)json_encode($data, JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR | $options)
);

return $response;
}
Expand Down

0 comments on commit 77bc945

Please sign in to comment.