It is used by Response to format response data.
To configure properties like [[encodeOptions]] or [[prettyPrint]], you can configure the response
application component like the following:
php
'response' => [
...
'formatters' => [
\yii\web\Response::FORMAT_JSON => [
'class' => 'yii\web\JsonResponseFormatter',
'prettyPrint' => YII_DEBUG, // use "pretty" output in debug mode
...
],
],
],