JMS Serializer: How to limit the depth of serialisation for an object graph

后端 未结 2 478
走了就别回头了
走了就别回头了 2021-01-06 15:48

Maybe it is just my misunderstanding of this annotation however it does not seam to work as expected.

I have the following object graph

User
 -> C         


        
2条回答
  •  一生所求
    2021-01-06 16:09

    As of the latest version, using @MaxDepth() annotation and SerializationContext::create()->enableMaxDepthChecks() in the controller does the job.

提交回复
热议问题