Extract a string from a child element
Extract a string from a child element, then transform it into the desired datatype
Take the string at the root of the input tree and pass it through the transformation pipeline provided.
Take the string at the root of the input tree and pass it through the transformation pipeline provided. This is usually done when constructing a codec for a datatype.
For example -
val someBool: Validated[ErrorTree, Boolean] = someInput.toField[Boolean]{x: String => Validated.catchOnly[IllegalArgumentException]( x.toBoolean ).leftMap(_ => ErrorMsg("invalid").toTree) }
Extract a string from the root of the Input tree.
Extract a string from the root of the Input tree. A more specialised version of toField that only handles strings.
Generate a UTF-8 URL encoded String.