Skip to content
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

circeToJackson maps integer value bigger than java.lang.Long.MAX_VALUE into DecimalNode #65

Open
chuwy opened this issue May 28, 2019 · 0 comments

Comments

@chuwy
Copy link

chuwy commented May 28, 2019

import com.fasterxml.jackson.databind.{ ObjectMapper, JsonNode }
import io.circe.literal._
import io.circe.jackson.circeToJackson

def getJsonNodeFromStringContent(content: String): JsonNode =
  (new ObjectMapper).readTree(content)

val circeJson = circeToJackson(json"""9223372036854775809""")
val jacksonJson = getJsonNodeFromStringContent("9223372036854775809")

println(s"circeJson is ${circeJson.getClass})
println(s"jacksonJson is ${jacksonJson.getClass})
circeJson is class com.fasterxml.jackson.databind.node.DecimalNode
jacksonJson is class com.fasterxml.jackson.databind.node.BigIntegerNode
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

No branches or pull requests

1 participant