0.8.3
sjson-new 0.8.3 is cross published against Scala 2.10, 2.11, 2.12, and 2.13.
#105 by @xuwei-k and #106 by @eed3si9n
Tuple-like syntax on LList
scala> import sjsonnew._, BasicJsonProtocol._, support.scalajson.unsafe._
import sjsonnew._
import BasicJsonProtocol._
import support.scalajson.unsafe._
scala> val xs = "age" -> 39 :*: "name" -> "foo" :*: LNil
xs: Int :*: (String :*: sjsonnew.LNil) = (age, 39) :*: (name, foo) :*: LNil
scala> val tryJson = Converter.toJson[Int :*: String :*: LNil](xs)
tryJson: scala.util.Try[sjsonnew.shaded.scalajson.ast.unsafe.JValue] = Success(JObject([Lsjsonnew.shaded.scalajson.ast.unsafe.JField;@6ed85780))
scala> PrettyPrinter(tryJson.get)
res0: String =
{
"$fields": ["age", "name"],
"age": 39,
"name": "foo"
}
scala> xs._1
res1: Int = 39
scala> xs._2
res2: String = foo