implicit val beenRW: ReadWriter[Been] = macroRW[Been]
val b1 = Been(1) // please note that for second field the default is used
println(write(b1, 2))
I get the following output:
{
"id": 1
}
As you can see the other field (name) was skipped.
How to force it to produce all of the fields regardless whether the default value was used to instantiate the given field or the concreate value was provided during initialization?
ID: 343
Original Author: tmichniewski
Hello,
I have a case class:
When I start export to json:
I get the following output:
As you can see the other field (name) was skipped.
How to force it to produce all of the fields regardless whether the default value was used to instantiate the given field or the concreate value was provided during initialization? ID: 343 Original Author: tmichniewski