Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialize Doctrine object without references #353

Closed
matiux opened this issue Oct 14, 2014 · 1 comment
Closed

Serialize Doctrine object without references #353

matiux opened this issue Oct 14, 2014 · 1 comment

Comments

@matiux
Copy link

matiux commented Oct 14, 2014

I took two objects in this way:

$users                      = $this->userRepo->findAll();

So, $users is an array of two User Object that in the schema have some references to another objects.
When I serialize the array:

$users =                    $this->serializer->serialize($users, 'json');
echo $users;

I obtain the json rapresentation of the whole object with all its references. Is there a way to limit the depth of serialization?

Thanks

@xabbuh
Copy link
Contributor

xabbuh commented Oct 16, 2014

Did you see @MaxDepth?

TheCelavi added a commit to RunOpenCode/serializer that referenced this issue Aug 11, 2016
@goetas goetas closed this as completed Mar 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants