endpoints4s.Codec
See theCodec companion trait
object Codec
Attributes
Members list
Value members
Concrete methods
def parseStringCatchingExceptions[A](`type`: String, parse: String => A, print: A => String): Codec[String, A]
Produce a codec to/from a string. If the parsing function fails, the decoding output is an Invalid with a message mentioning the type name.
Produce a codec to/from a string. If the parsing function fails, the decoding output is an Invalid with a message mentioning the type name.
Value parameters
- parse
-
parsing function to use, with exceptions turned into Invalid
-
printing function to use, not supposed to throw exceptions
- type
-
name of the type being decoded
Attributes
Combines two codecs, sequentially, by feeding the input of the second one with the output of the first one
Combines two codecs, sequentially, by feeding the input of the second one with the output of the first one
Attributes
Concrete fields
In this article