I am attempting to use JSON to send data between the browser and my app.
I am attempting to use Lift 1.0 to create and parse JSON strings, but for some reason I am u
Take a look at Circe. It's really nice to use and it leverages some of the new tools from Shapeless and Cats. Plus, you can use it from Scala compiled to Javascript.
Taken from the Circe readme:
scala> import io.circe., io.circe.generic.auto., io.circe.parser., io.circe.syntax. import io.circe._ import io.circe.generic.auto._ import io.circe.parser._ import io.circe.syntax._
scala> sealed trait Foo defined trait Foo
scala> case class Bar(xs: List[String]) extends Foo defined class Bar
scala> case class Qux(i: Int, d: Option[Double]) extends Foo defined class Qux
scala> val foo: Foo = Qux(13, Some(14.0)) foo: Foo = Qux(13,Some(14.0))
scala> foo.asJson.noSpaces res0: String = {"Qux":{"d":14.0,"i":13}}
scala> decodeFoo res1: cats.data.Xor[io.circe.Error,Foo] = Right(Qux(13,Some(14.0)))