Skip to content

Conversation

georgewfraser
Copy link
Contributor

JSON can have number values outside the range of double. Also, it's important that multipleOf have an exact representation to be interpreted correctly. BigDecimal is better for these reasons.

@cowtowncoder
Copy link
Member

I can see why this could be an improvement, but it would also be a backwards-incompatible change, and possibly break existing code. Is there anything we could do to alleviate those problems? Otherwise simple upgrade of module to 2.7 (where this could be merged) could break existing deployments.

@georgewfraser
Copy link
Contributor Author

We could have two functions like:

private BigDecimal minimum;

public Double getMinimum() { ... }

@JsonIgnore
public BigDecimal getMinimumDecimal() { ... }

This would avoid breaking existing code, at the cost of carrying a little bit of legacy cruft forever.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants