-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
custom type using a custom handler for primitives #385
Comments
I'd like this also. |
I would like it also. I have a need, for example, to serialize/deserialize values of type Carbon into a string of predefined format. I would happily write a serialization/deserialization handler for the type. |
The same here. |
solved with schmittjoh/serializer#610 |
It's nice to have the @type annotation to format e.g. datetime database fields.
Why is it not possible to write a custom handler to modify primitives like string. My use case is to run htmlpurifier on certain fields that contain html.
I now use the event pre_serialize, but a type annotation would be more flexible. Is there a reason it is not possible to use a custom type?
The text was updated successfully, but these errors were encountered: