Closed judgej closed 5 years ago
I was in two minds about adding __toString()
support too, but since the desired serialisation could be either JSON or XML, I felt it better not to force the decision of which it is onto developers.
The docs - I forgot the docs. Does it need a mention, or will it just be obvious to people who need it, and ignored by people who don't?
Hm, the README could use some updating anyway as it's also missing the middleware support. If you want to take a crack at it in another PR, go for it. If not I'll try to update the README in the near-ish future before tagging a new release.
Simple
JsonSerializable
support.This is useful in frameworks such as Laravel or Lumen that will accept any object as a HTTP response payload that can be JSON serialised.
Resolves #26