Closed AaronJRubin closed 2 years ago
@AaronJRubin Thank you for reporting this! This PR, unfortunately, seems to contain breaking changes and it's hard to merge these changes promptly. We'll consider the way to mitigate the issue internally.
@tomohiro-okuyama Have you been able to find a good solution to mitigate this issue that would not introduce a breaking change?
@AaronJRubin
We decided to deserialize CALC field values to String
, but keep the signatures of getters to avoid breaking changes.
Instead, we add some methods to get the raw String
values, like String CalcFieldValue.getRawValue()
and String Record.getCalcFieldRawValue()
.
We are going to merge this PR soon first. After that, we'll add above changes and release it as v1.4.0. Thank you!
I see - that sounds like a great solution! Thanks so much for moving this forward.
@AaronJRubin We have merged this PR and added you to the list of contributors (https://github.com/kintone/kintone-java-client/pull/35). Thanks again for your contribution.
As documented at https://developer.cybozu.io/hc/ja/articles/202166330-%E3%83%95%E3%82%A3%E3%83%BC%E3%83%AB%E3%83%89%E5%BD%A2%E5%BC%8F, a Calc field can contain a string representation of a Date, DateTime, or Time in addition to a number. Therefore, we cannot assume that the data will be parsable as a BigDecimal, and the simplest/cleanest fix is just to keep the value as a string and let the consumer of the API handle appropriately.