We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af11043 commit 446ddffCopy full SHA for 446ddff
1 file changed
system/Format/JSONFormatter.php
@@ -40,6 +40,7 @@
40
namespace CodeIgniter\Format;
41
42
use CodeIgniter\Format\Exceptions\FormatException;
43
+use Config\Format;
44
45
/**
46
* JSON data formatter
@@ -56,6 +57,8 @@ class JSONFormatter implements FormatterInterface
56
57
*/
58
public function format($data)
59
{
60
+ $config = new Format();
61
+
62
$options = $config->formatterOptions['application/json'] ?? JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES;
63
$options = $options | JSON_PARTIAL_OUTPUT_ON_ERROR;
64
0 commit comments