[FLOW3-general] child objects in JsonView
Karsten Dambekalns
karsten at typo3.org
Thu Dec 13 10:27:54 CET 2012
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
--
Karsten Dambekalns
TYPO3 Core Developer, Neos / Flow Team
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the FLOW3-general
mailing list