-
Notifications
You must be signed in to change notification settings - Fork 54
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
Range property name (de)serialisation doesn't respect property naming strategy #56
Comments
True, since there's custom (de)serializer, instead of default POJO one, field names are essentially hard-coded. Would be happy to work on improvement. On proof-of-concept, calling field name mutators on-the-fly is bit cost-prohibitive, so I would not want that to occur at time of (de)serialization. But you should be able to do that instead in Actually, come to think of this, there may be even simpler way to achieve early changing. (De)Serializers are registered by Let me know if you need more information on above: I don't think I have done this for other custom/external (de)serializers but there should be no blockers. |
Hi @cowtowncoder, thanks for your quick response. I have gone ahead with your first suggestion for the time being #57. Let me know what you think. |
Access to
or accessible via context ( So that is how you can access globally configured strategy via However, ideally there probably should be a mechanism to allow per-class overrides (in fact, theoretically it should be possibly to apply mix-in to But for now I think use of global default would make most sense. |
Implement #56, support for naming strategy for `Range` values.
Field names in the Guava
Range<T>
are serialised and deserialised with the hard coded valueslowerEndpoint
,lowerBoundType
,upperEndpoint
andupperBoundType
:For consistent JSON field naming it would be nice to support other property naming strategies. For example snake case:
Please see here for the basic idea philleonard@8a3f36f. Happy to open this as a PR and change to whatever is the correct way of formatting field names when writing them as strings.
The text was updated successfully, but these errors were encountered: