dannykopping / spore

ReSTful extensions for Slim
29 stars 2 forks source link

Update Spore/ReST/Data/Serializer/JSONSerializer.php #14

Closed mathielen closed 11 years ago

mathielen commented 11 years ago

What do you think about that extension? Should be implemented in XmlSerializer, too.

dannykopping commented 11 years ago

Not too crazy about this, to be honest.

I think this is a very specific use-case and I wouldn't want to add in some magic that some users may not be expecting. Users are expecting to send back an object - if they want to force it to an array, they can simply call the toArray() function themselves when the route returns data.

Thanks @mathielen

mathielen commented 11 years ago

Yea, you're right. Thanks.