xabbuh / panda-client

basic PHP client for the Panda encoding service
MIT License
14 stars 5 forks source link

Add Payload property in the Video Model #2

Closed tgallice closed 10 years ago

tgallice commented 10 years ago

Actually the Video Model don't have the payloadproperty. The issue is when we want to transform a Json response with the payload attribute to a Video object. An error is raise by the Normalizer who doesn't find the setter

xabbuh commented 10 years ago

Thanks! I merged this in at 303b1631bef4b1fcb91833da62c208b2229e58db.

xabbuh commented 10 years ago

Actually, I'm not really sure anymore if it is a good idea to fail when hitting unknown property. Instead those could be silently ignored. What do think?

stof commented 10 years ago

@xabbuh ignoring unknown properties would indeed be safer. Adding additional properties in an API response is generally not considered as a BC breaking change, so clients should accept them even if they are not able to use them.