Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.12 KB

JsonEncode.md

File metadata and controls

46 lines (31 loc) · 1.12 KB

JSON Encode

Converts a value into its JSON representation.

/** @var \Wizaplace\Etl\Transformers\JsonEncode $transformer */
$etl->transform($transformer, $options);

Options

Columns

Columns that will be transformed. If empty, the transformation is applied to all columns.

Type Default value
array []
$options = [JsonEncode::COLUMNS => ['preferences']];

Options

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];

Depth

The maximum depth. Must be greater than zero.

Type Default value
int 512
$options = [JsonEncode::DEPTH => 32];