You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering why there is default emptyWriter implementation https://github.com/tethys-json/tethys/blob/3ffbdb4cf27595580041a01f4b1e1bd98cb486f2/modules/core/src/main/scala/tethys/writers/EmptyWriters.scala and there is no emptyReader. For example:
i would like to serialize something like this: case class Person[A](id: Int, names: List[A])
well, for encoding i can just write: implicit val PersonEmptyWriter: JsonObjectWriter[Person[String]] = EmptyWriters.emptyWriter
but i can't do the same for decode something like this: {id: 1, names: []}
so i have to write empty implementation of reader which is basiclly just signature of method.
Are there any reasons for not creating "EmptyReaders.emptyReader"?
The text was updated successfully, but these errors were encountered:
I was wondering why there is default emptyWriter implementation https://github.com/tethys-json/tethys/blob/3ffbdb4cf27595580041a01f4b1e1bd98cb486f2/modules/core/src/main/scala/tethys/writers/EmptyWriters.scala and there is no emptyReader. For example:
i would like to serialize something like this:
case class Person[A](id: Int, names: List[A])
well, for encoding i can just write:
implicit val PersonEmptyWriter: JsonObjectWriter[Person[String]] = EmptyWriters.emptyWriter
but i can't do the same for decode something like this:
{id: 1, names: []}
so i have to write empty implementation of reader which is basiclly just signature of method.
Are there any reasons for not creating "EmptyReaders.emptyReader"?
The text was updated successfully, but these errors were encountered: