Skip to content

Commit 446ddff

Browse files
authored
update as per change request
update as per change request
1 parent af11043 commit 446ddff

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

system/Format/JSONFormatter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
namespace CodeIgniter\Format;
4141

4242
use CodeIgniter\Format\Exceptions\FormatException;
43+
use Config\Format;
4344

4445
/**
4546
* JSON data formatter
@@ -56,6 +57,8 @@ class JSONFormatter implements FormatterInterface
5657
*/
5758
public function format($data)
5859
{
60+
$config = new Format();
61+
5962
$options = $config->formatterOptions['application/json'] ?? JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES;
6063
$options = $options | JSON_PARTIAL_OUTPUT_ON_ERROR;
6164

0 commit comments

Comments
 (0)