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
Issue decoding BigDecimal in Scala.js #262
Comments
Unfortunately this is a known issue for Scala.js, where we can't do better than the precision of These limitations on Scala.js should be documented more thoroughly—I'll take a shot at that now. |
I've just added some additional documentation in #263—does that look reasonable to you, @cminekime? |
The added documentation does help and thank you for the link to your blog post. It definitely helps me understand the design decisions you've made. For what it is worth, I was able to achieve what I needed by providing my own implicit Encoder and Decoder for BigDecimals that treat them like Strings:
It may not be in the spirit of how to handle JSON numbers, but I'm glad the library was flexible enough to allow me to do this. |
When running the following ScalaTest test in my project:
It succeeds for standard Scala, but fails with the following output for Scala.js:
I can provide more info or examples as needed. Thanks!
The text was updated successfully, but these errors were encountered: