-
Notifications
You must be signed in to change notification settings - Fork 108
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
Switch jNumber to support arbitrary precision numbers. #116
Comments
I've added cases for Long and Double. It would be really easy to add a case for a Spire construct like I tried adding BigInteger and BigDecimal, but these are extremely problematic. For example, My commit improves the situation drastically for ElasticSearch. |
Conflicts: src/main/scala/argonaut/DecodeJson.scala src/main/scala/argonaut/EncodeJson.scala src/main/scala/argonaut/Json.scala src/main/scala/argonaut/JsonParser.scala src/main/scala/argonaut/PrettyParams.scala src/test/scala/argonaut/CodecNumberSpecification.scala src/test/scala/argonaut/JsonSpecification.scala src/test/scala/argonaut/KnownResults.scala src/test/scala/argonaut/PrettyParamsSpecification.scala src/test/scala/argonaut/StringWrapSpecification.scala
Improved prettyprinting test Add BigDecimal and "lazy" Decimal JsonNumbers. This also switches the parser to just use the new JsonNumber.fromString method to obtain a JsonNumber. This method will return either a JsonLong if the value is a long or a JsonLazyDecimal otherwise. Add JsonNumber.fromString specs. Add some docs for JsonDecimal. Fix parser test to match new class of valid numbers. Allow semantic equality checks on JsonDecimals. Added a `normalized` method to JsonDecimal which allows us to compare JsonDecimals for *numeric* equality, even though we cannot represent them as BigDecimal, in general. Implemented a proper equals on JsonNumber. This is required to get the tests passing again. Ensure numeric equality is preserved in JsonNumber. Fix formatting in JsonNumberSpecification. Add BigInt and BigDecimal encoders/decoders. Better jNumber and friends impl for Strings.
This was fixed by #147 - can be closed. |
There is a plethora of issues related to this. We should do it before 6.1, but I really don't have time. So I am documenting a rough strategy in the hope that someone else does:
The text was updated successfully, but these errors were encountered: