[FLOW3-general] child objects in JsonView

Thomas Mammitzsch thomas at visualworx.de
Thu Dec 13 12:35:57 CET 2012


No, but thanks for pointing out. I don't get it working with that 
configuration:

         $this->view->setConfiguration(array(
             'value'=>array(
                 '_descend' => array(
                     'objectcoordinates' => array()
                     )
                 )
             )
         );

	$this->view->assign('value', $scoutobjects);

where objectcoordinates is the child object i want to include in json.

regards, Thomas


On 13.12.2012 10:27, Karsten Dambekalns wrote:
> Hi.
>
> On 12.12.12 23:44, Thomas Mammitzsch wrote:
>> i think its a missing feature, that
>> TYPO3_Flow_Mvc_View_JsonView->transformObject() doesn't transform child
>> objects of the parent object. A workaround is the following in controller:
>
> Did you set descend options? From the JsonView class:
>
>   ----- snip -----
> If a property value is an array or object, it is not included
> by default. If, however, such a property is listed in a "_descend"
> section, the renderer will descend into this sub structure and
> include all its properties (of the next level).
>
> The configuration of each property in "_descend" has the same syntax
> like at the top level. Therefore - theoretically - infinitely nested
> structures can be configured.
>
> To export indexed arrays the "_descendAll" section can be used to
> include all array keys for the output. The configuration inside a
> "_descendAll" will be applied to each array element.
>   ----- snip -----
>
>
> Regards,
> Karsten
>



More information about the FLOW3-general mailing list