Custom (de)serializers #89
Replies: 2 comments 9 replies
-
It should probably also have a string param for (default) content type. |
Beta Was this translation helpful? Give feedback.
-
I think it looks good architecturally, but bad from a ux point of view. It is convenient and understandable for developers to use ToJSON, if server return for example xml, most convient way is to find ToXML, not to call Serialize with parameters. It seems that for complete happiness it is only necessary to give the opportunity to speed up toJSON method (keep in mind that 90%+ usecases will return JSON). Moreover, it seems to me, that this should not be within the framework of conditional FastToJSON, but in the form of a GLOBAL override of the serializer/deserializer for json especially. Because memorize that in each request we need to override serialize is quite hard. |
Beta Was this translation helpful? Give feedback.
-
I would be nice to be able to support alternative JSON libraries, like #87 and #88. JSON is just one kind of serialization. There's also XML, a la #79 / #82, and presumably other options like binary (Protobuf?) and whatnot.
What if we add a new API like
@EvilBorsch, what do you think of this idea?
Beta Was this translation helpful? Give feedback.
All reactions