diff options
Diffstat (limited to 'src/main/scala/spray/json/BasicFormats.scala')
-rw-r--r-- | src/main/scala/spray/json/BasicFormats.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/scala/spray/json/BasicFormats.scala b/src/main/scala/spray/json/BasicFormats.scala index 96751f6..65b9ecb 100644 --- a/src/main/scala/spray/json/BasicFormats.scala +++ b/src/main/scala/spray/json/BasicFormats.scala @@ -79,6 +79,7 @@ trait BasicFormats { } def read(value: JsValue) = value match { case JsNumber(x) => x + case JsString(x) => BigDecimal(x) case x => deserializationError("Expected BigDecimal as JsNumber, but got " + x) } } @@ -90,6 +91,7 @@ trait BasicFormats { } def read(value: JsValue) = value match { case JsNumber(x) => x.toBigInt + case JsString(x) => BigInt(x) case x => deserializationError("Expected BigInt as JsNumber, but got " + x) } } |