Skip to content

Introduce a @Depth annotation #104

@dunglas

Description

@dunglas

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;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy