Skip to content
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

Support for formatted number output #166

Closed
thorsten-reitz opened this issue Sep 13, 2016 · 3 comments
Closed

Support for formatted number output #166

thorsten-reitz opened this issue Sep 13, 2016 · 3 comments

Comments

@thorsten-reitz
Copy link
Member

thorsten-reitz commented Sep 13, 2016

Currently, hale uses java standard number serialization, but in many situations a defined number format, with a fixed number of decimals before and after the point, potentially with leading zeroes is required. It should be possible to define this for formats that don't have a constraint expressing that (many databases do, but XSD doesn't). The preferred implementation for this is as a constraint on the property, with a writer configuration option.

DoD:

  • Provide control for this in XML only.
@thorsten-reitz
Copy link
Member Author

Check how to enforce serialization to formatted numbers first -> Spike

@thorsten-reitz thorsten-reitz added this to the 3.1.0 milestone Oct 12, 2016
@stempler
Copy link
Member

We analyzed this and found that writing the coordinates of geometry objects is handled in a central place. So adding support for custom number formatting there would be quite easy. My understanding of the original use case was that this is mainly related to the representation of geometries.

@thorsten-reitz Is that correct and would an implementation that targets the encoded geometries be sufficient?

@thorsten-reitz
Copy link
Member Author

@stempler yes, that is correct and would be OK for now. I don't think a global setting makes sense for individual fields otherwise. Is there an XML type like BigDecimal that allows control over the serialisation of numbers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants