Skip to content

Commit 8bdda7a

Browse files
authored
Update Format.php
1 parent 9355063 commit 8bdda7a

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

app/Config/Format.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,23 @@ class Format extends BaseConfig
3939
'application/xml' => \CodeIgniter\Format\XMLFormatter::class,
4040
'text/xml' => \CodeIgniter\Format\XMLFormatter::class,
4141
];
42-
42+
43+
/*
44+
|--------------------------------------------------------------------------
45+
| Formatters Options
46+
|--------------------------------------------------------------------------
47+
|
48+
| Additional Options to adjust default formatters behaviour.
49+
| For each mime type, list the additional options that should be used.
50+
| Set to null by default
51+
| Note this will add to the default options not replace it.
52+
|
53+
*/
54+
public $formatterOptions = [
55+
'application/json' => JSON_NUMERIC_CHECK,
56+
'application/xml' => null,
57+
'text/xml' => null,
58+
];
4359
//--------------------------------------------------------------------
4460

4561
/**

0 commit comments

Comments
 (0)