1
Wie kann ich folgenden impliziten Konflikt lösen? Ich konvertierte ein Double zu JsValue mit Json.toJson. Der umgekehrte Prozess funktioniert nicht. Es gibt einen impliziten Konflikt.Json.fromJson funktioniert nicht für Int oder Double
scala> val doublejsv = Json.toJson(4.1)
doublejsv: play.api.libs.json.JsValue = 4.1
scala> Json.fromJson(doublejsv)
<console>:21: error: ambiguous implicit values:
both object IntReads in trait DefaultReads of type play.api.libs.json.Reads.IntReads.type
and object ShortReads in trait DefaultReads of type play.api.libs.json.Reads.ShortReads.type
match expected type play.api.libs.json.Reads[T]
Json.fromJson(doublejsv)
^