Coder Social home page Coder Social logo

Comments (7)

dunglas avatar dunglas commented on July 28, 2024

Alternative:

  • Introduce the Depth annotation directly in the Symfony Serializer component
  • Add a handler system similar to the circular reference handler
  • Register a custom handler outputting an IRI in the bundle

from core.

SoboLAN avatar SoboLAN commented on July 28, 2024

If the depth of the objects is higher than the specified value in @Depth annotation, then how will the output look like ?

Also, the next step the Serializer will do after normalizing is encoding. In that case, wouldn't the encoding step fail ?

from core.

dunglas avatar dunglas commented on July 28, 2024
  • In Symfony, it will work like for circular reference: allow to register a \Callable as handler, the default callable throw an exception
  • The bundle will register a custom handler outputting the IRI of the relation
  • Because of the previous, it will the encoding will be OK in the bundle

from core.

MLKiiwy avatar MLKiiwy commented on July 28, 2024

Really good idea, maybe add also this option in normalization / denormalization context ?

from core.

Drachenkaetzchen avatar Drachenkaetzchen commented on July 28, 2024

+1 from me. @Depth is pretty much essential for serializing trees.

from core.

theofidry avatar theofidry commented on July 28, 2024

@dunglas any update regarding this feature?

from core.

sroze avatar sroze commented on July 28, 2024

Done in symfony/symfony#17113

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.