Skip to content

Commit 1c65410

Browse files
authored
add config option to add to format options
add config option to add to format options
1 parent 8bdda7a commit 1c65410

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

system/Format/JSONFormatter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ class JSONFormatter implements FormatterInterface
5656
*/
5757
public function format($data)
5858
{
59-
$options = JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR | JSON_NUMERIC_CHECK;
59+
$options = $config->formatterOptions['application/json'] ?? 0;
60+
$options = $options | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR ;
6061

6162
$options = ENVIRONMENT === 'production' ? $options : $options | JSON_PRETTY_PRINT;
6263

0 commit comments

Comments
 (0)