trait SmartJsonNumberParsing { val doubleRe = """.*\..*""".r scala.util.parsing.json.JSON.perThreadNumberParser = { n : String => n match { case doubleRe() => BigDecimal(n) case int => BigInt(n) }} }
Chapter X. In which our her0 enters waters of åNdroid (but not only) development while fulfilling his destiny which will never be known to anyone including those who's supposed to know it but for reason of their non-existence you're not reading this aren't you question mark.
Friday, June 11, 2010
just use this one if you need per-thread smart(produces ints if can) parsing of json numbers:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment