I am trying to wrap Argonaut (http://argonaut.io) in order to serialize/deserialize JSON in a Scala project. We where using Jerkson before but as it has been discontinued we are looking for an alternative.
This is the basic JSON wrapper
import argonaut._, Argonaut._
object Json {
def Parse[T](input: String): T = {
input.decodeOption[T].get
}
}
When I try and compile this I get the following errors.
could not find implicit value for evidence parameter of type argonaut.DecodeJson[T]
input.decodeOption[T]
^
not enough arguments for method decodeOption: (implicit evidence$6: argonaut.DecodeJson[T]) Option[T].
Unspecified value parameter evidence$6.
input.decodeOption[T]
^
Any suggestions on how to fix this or pointers on what I am doing wrong would be most appreciated.
Also suggestions on alternative JSON frameworks are very welcome.
I'm kind of new to Scala/Java and how generics work there but I have been writing .NET/C# for many years.