When serializing trees with groups such as the following, it is convenient to be able to configure the Serialization depth:
class TreeEntry
{
/**
* @var TreeEntry
* @Groups{"a"}
*/
public $parent;
}
A new @Depth(n) where N is the maximum depth level to normalize can be useful for such use case. When n is reached, the normalizer will output the IRI of the resource instead of embedding it. Proposal:
class TreeEntry
{
/**
* @var TreeEntry
* @Groups{"a"}
* @Depth(2)
*/
public $parent;
}
When serializing trees with groups such as the following, it is convenient to be able to configure the Serialization depth:
A new
@Depth(n)where N is the maximum depth level to normalize can be useful for such use case. Whennis reached, the normalizer will output the IRI of the resource instead of embedding it. Proposal: