eZ\Publish\Core\REST\Common\Output\Generator\Json\FieldTypeHashGenerator::generateArrayValue PHP Method

generateArrayValue() protected method

If $type only contains numeric keys, the resulting structure will be an JSON array, otherwise a JSON object
protected generateArrayValue ( ArrayObject | Object $parent, array $value ) : ArrayObject | Object
$parent ArrayObject | Object
$value array
return ArrayObject | Object
    protected function generateArrayValue($parent, array $value)
    {
        if ($this->isNumericArray($value)) {
            return $this->generateListArray($parent, $value);
        } else {
            return $this->generateHashArray($parent, $value);
        }
    }