Converts a value into its JSON representation.
/** @var \Wizaplace\Etl\Transformers\JsonEncode $transformer */
$etl->transform($transformer, $options);
Columns that will be transformed. If empty
, the transformation is applied to all columns.
Type | Default value |
---|---|
array | [] |
$options = [JsonEncode::COLUMNS => ['preferences']];
Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT, JSON_PRESERVE_ZERO_FRACTION, JSON_UNESCAPED_UNICODE, JSON_PARTIAL_OUTPUT_ON_ERROR. The behaviour of these constants is described on the JSON constants page.
Type | Default value |
---|---|
int | 0 |
$options = [JsonEncode::OPTIONS => JSON_FORCE_OBJECT];
The maximum depth. Must be greater than zero.
Type | Default value |
---|---|
int | 512 |
$options = [JsonEncode::DEPTH => 32];