Feature: #90347 - Enable recursive transformation of properties in JsonView

See forge#90347

Description

The Extbase \TYPO3\CMS\Extbase\Mvc\View\JsonView is now able to resolve recursive properties of objects, e.g. directories containing directories or comments containing comments as replies.

Examples:

  1. This is for 1:1 relations, where a comment has at most 1 comment.
$configuration = [
    'comment' => [
        '_recursive' => ['comment']
     ]
];
Copied!
  1. This is for the more common 1:n relation in which you have lists of sub objects.
$configuration = [
    'directories' => [
        '_descendAll' => [
            '_recursive' => ['directories']
        ],
    ]
];
Copied!

You can put all the other configuration like _only or _exclude at the same level as _recursive and the view will apply this for all levels.

Impact

Developers can now use the _recursive property in the JsonView configuration in order to resolve recursive properties instead of defining each level manually.