JsonView Configuration behaves differently for arrays and objects
Currently, the behavior for the JsonView configuration is completely different for arrays and objects, which makes configuring anything other than a simple one-level hierarchy output very hard.
See http://lists.typo3.org/pipermail/flow/2013-May/003846.html for more information.
I therefore suggest the following change to the JsonView Configuration:
- arrays and objects should be configured equally apart from the object identifier/class name options
- _only and _exclude should always take precedence and act as a whitelist/blacklist
- _descendAll should also work for objects
- simple type properties/elements should be serialized directly in both cases
- _descend should configure all other array/object properties/elements
If _descend should still act as a second level whitelist, so that all array/object values not configured there are skipped is debatable - it would be more like the current implementation, though from a user POV it is a little bit misleading as to what the difference of _only vs _descend would be.
This would lead to following breaking behaviors:
- arrays are no longer fully evaluated by default (_descend acts as whitelist) or objects are fully evaluated by default (_descend does not whitelist but only sets configuration for subvalues)
- arrays are no longer evaluated deeply by default and need explicit _descendAll configuration for each level