Skip to content
New issue

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

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

Already on GitHub? # to your account

Bugfix: arrays returned as objects like {"0":... } #373

Closed
wants to merge 3 commits into from
Closed

Bugfix: arrays returned as objects like {"0":... } #373

wants to merge 3 commits into from

Conversation

Nadrieril
Copy link

Tests added #304

Nadrieril and others added 3 commits July 19, 2014 17:23
Bugfix: the root could be modified when it shouldn't
@dizda
Copy link

dizda commented Dec 17, 2014

To test it:

phpunit --filter JsonSerializationTest

Without the fix, the serializer return:

{"0":{"id":"what_a_nice_id","title":"#1 This is a nice title.","is_published":false,"etag":"1edf9bf60a32d89afbb85b2be849e3ceed5f5b10","author":{}},"1":{"id":"what_a_nice_id","title":"#2 This is a nice title again.","is_published":false,"etag":"1edf9bf60a32d89afbb85b2be849e3ceed5f5b10","author":{}}}

instead of:

[{"id":"what_a_nice_id","title":"#1 This is a nice title.","is_published":false,"etag":"1edf9bf60a32d89afbb85b2be849e3ceed5f5b10","author":{}},{"id":"what_a_nice_id","title":"#2 This is a nice title again.","is_published":false,"etag":"1edf9bf60a32d89afbb85b2be849e3ceed5f5b10","author":{}}]

@vkartaviy
Copy link

👍

@dizda
Copy link

dizda commented Feb 19, 2015

What's up on this PR?

j-ledoux added a commit to j-ledoux/serializer that referenced this pull request Jun 5, 2015
j-ledoux added a commit to j-ledoux/serializer that referenced this pull request Jun 5, 2015
@hairmare
Copy link

hairmare commented Sep 7, 2015

👍

1 similar comment
@narcoticfresh
Copy link

+1

@andreaslarssen
Copy link

Is this actually a fix for THE bug? Anyone maintaining this repo still?

@dizda
Copy link

dizda commented Nov 2, 2015

Have you tried with the last release of this repo? Seems the last commits fixed this pb on my projects.

@andreaslarssen
Copy link

You're ABSOLUTELY right. Composer update did it. Thanks! My bad, but shouldn't this PR be closed, and along with it all the issues related to it?

@dizda
Copy link

dizda commented Nov 2, 2015

Agree to close this issue 👍 .

@Nadrieril Nadrieril closed this Dec 13, 2015
@goetas goetas mentioned this pull request Apr 14, 2017
21 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants