You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was trying to convert a Sequence object to JSON, and just getting {} as the result. However, serializing $sequence->all() works just fine - gives me an array of items. Obviously the items themselves need to be serializable too, but that's not php-collection's problem.
So, could Sequence (and I guess the other collection types) be given JSON serialisation support? It is probably just as simple as adding this method and implementing \JsonSerializable:
Was trying to convert a
Sequence
object to JSON, and just getting{}
as the result. However, serializing$sequence->all()
works just fine - gives me an array of items. Obviously the items themselves need to be serializable too, but that's not php-collection's problem.So, could
Sequence
(and I guess the other collection types) be given JSON serialisation support? It is probably just as simple as adding this method and implementing\JsonSerializable
:I can provide a PR if this is something you would like.
The text was updated successfully, but these errors were encountered: