Hi, Please open link https://scalafiddle.io/sf/UbAmA6A/0
You can see my code:
`
import upickle.default.{macroRW, ReadWriter => RW, Reader => R, Writer => W}
case class ResultVo[E](result: E, totalCount: Long = 0, status: Int, msg: String, now: String)
println(upickle.default.write(ResultVo("ok", 0L, 200, "success", "2019-01-10 00:00:59")))
I use "com.lihaoyi" %%% "upickle" % "0.9.5", Then Run result is {"result":"ok","status":200,"msg":"success","now":"2019-01-10 00:00:59"}`
Why the totalCount is lose ???
Thank you!
Hi, Please open link https://scalafiddle.io/sf/UbAmA6A/0 You can see my code: ` import upickle.default.{macroRW, ReadWriter => RW, Reader => R, Writer => W}
case class ResultVo[E](result: E, totalCount: Long = 0, status: Int, msg: String, now: String)
object ResultVo{
implicit def rw[E: R: W]: RW[ResultVo[E]] = macroRW
}
println(upickle.default.write(ResultVo("ok", 0L, 200, "success", "2019-01-10 00:00:59")))
I use "com.lihaoyi" %%% "upickle" % "0.9.5", Then Run result is
{"result":"ok","status":200,"msg":"success","now":"2019-01-10 00:00:59"}` Why the totalCount is lose ??? Thank you!ID: 294 Original Author: kizzyang