object JsObjParser extends Serializable
- Alphabetic
- By Inheritance
- JsObjParser
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- def parse(str: String): Either[InvalidJson, JsObj]
parses a string into a Json object.
parses a string into a Json object. If the string doesn't represent a well-formed Json object, a MalformedJson failure wrapped in a Try computation is returned.
- str
a Json object serialized in a string
- returns
a try computation with the result
- def parse(bytes: Array[Byte]): Either[InvalidJson, JsObj]
parses an array of bytes into a Json object.
parses an array of bytes into a Json object. If the array of bytes doesn't represent a well-formed Json object, a MalformedJson failure wrapped in a Try computation is returned.
- bytes
a Json object serialized in an array of bytes
- returns
a try computation with the result
- def parse(inputStream: InputStream): Try[JsObj]
parses an input stream of bytes into a Json object that must conform the spec of the parser.
parses an input stream of bytes into a Json object that must conform the spec of the parser. If the the input stream of bytes doesn't represent a well-formed Json object, a MalformedJson failure wrapped in a Try computation is returned. Any I/O exception processing the input stream is wrapped in a Try computation as well
- inputStream
the input stream of bytes
- returns
a try computation with the result