Code snippet in REPL
scala> import com.codahale.jerkson.Json._
scala> val t = (1, 3.14, "Fred")
scala> generate(t)
res5: String = {"_1":1,"_2":3.14,"_3":"Fred"}
On the way out, I want to assign a label attribute instead of _1, _2, _3. How should I do it?
source
share