Open Tolsi opened 8 years ago
Similarly, the ProductFormatsInstances
which create JsonFormats for Case Classes from JsonFormats for their components only work for read/write formats, not for write-only JsonWriters
This looks like a duplicate of #51
All implicit methods of CollectionFormats trait contains JsonFormat type bounds. Why? I think it's not uncomfortable and confuse, because I can have only JsonReader/JsonWriter. For example:
There will be a compile-time errors: "
Cannot find JsonWriter or JsonFormat type class for Seq[test.Test.A].
" and "not enough arguments for method toJson: (implicit writer: spray.json.JsonWriter[Seq[test.Test.A]])spray.json.JsValue. Unspecified value parameter writer.
" :< To understand what was going on, I can use-Xlog-implicits
:But I'm not going to read this object here, I do not need JsonFormat really.