Or even better, have built-in language support for Decimal
literals. The JSON coding issue is caused by the internal implementation of JSONSerialization (and JSONDecoder by proxy), which does Data
-> Double
-> Decimal
conversion instead of direct Data
-> Decimal
conversion.
1 Like