Closed eed3si9n closed 7 years ago
Make an object with a Vector field, serialize it to JSON.
The field is omitted. For example, in the following example, "diagnostics": [] is missing.
"diagnostics": []
JsonRpcNotificationMessage(2.0, textDocument/publishDiagnostics, {"uri":"file:/xxx/Hello.scala"})
The receiver of the message is not happy.
Empty fields are not omitted.
This was an intentional design added in #6. I think Option[A] can continue to elide.
Option[A]
https://github.com/eed3si9n/sjson-new/pull/72
Yea, I was wrong on this design decision. I still do think we need some way of evolving the JSON schema while remaining bincompat on Scala side. I'll go back to the drawing board.
steps
Make an object with a Vector field, serialize it to JSON.
problem
The field is omitted. For example, in the following example,
"diagnostics": []
is missing.The receiver of the message is not happy.
expectation
Empty fields are not omitted.
notes
This was an intentional design added in #6. I think
Option[A]
can continue to elide.