Open amnaredo opened 2 years ago
$ amm Loading... Welcome to the Ammonite Repl 1.6.9 (Scala 2.13.0 Java 1.8.0_222) If you like Ammonite, please support our development at www.patreon.com/lihaoyi @ val expected = 1234567890123456789L expected: Long = 1234567890123456789L @ val json = ujson.read("""{"a":1234567890123456789}""") json: ujson.Value.Value = Obj(LinkedHashMap("a" -> Num(1.23456789012345677E18))) @ json.obj("a").num.toLong == expected res3: Boolean = false @ // workaround @ import upickle.default._ import upickle.default._ @ case class LongValue(a: Long) defined class LongValue @ implicit val reader: Reader[LongValue] = macroR reader: Reader[LongValue] = ammonite.$sess.cmd6$$anon$1@37c49a55 @ upickle.default.read[LongValue]("""{"a":1234567890123456789}""").a == expected res7: Boolean = true
ID: 278 Original Author: NomadBlacky
this is working as intended Original Author: lihaoyi
ID: 278 Original Author: NomadBlacky