JsonStreamSyntax

class JsonStreamSyntax[F[_], O](stream: Stream[F, O])

Suffix syntax and convenience methods for parseJson

Suffix syntax and convenience methods for parseJson

class Object
trait Matchable
class Any

Value members

Concrete methods

def parseJson[J](mode: Mode)(F: ApplicativeError[F, Throwable], A: Absorbable[O], facade: Facade[J]): Stream[F, J]

Parses a source to any Jawn-supported AST using the specified Async mode.

Parses a source to any Jawn-supported AST using the specified Async mode.

Type Params
J

the JSON AST to return

Value Params
facade

the Jawn facade to materialize J

mode

the async mode of the Jawn parser

def parseJsonStream[J](F: ApplicativeError[F, Throwable], A: Absorbable[O], facade: Facade[J]): Stream[F, J]

Emits individual JSON elements as they are parsed.

Emits individual JSON elements as they are parsed.

Type Params
J

the JSON AST to return

Value Params
facade

the Jawn facade to materialize J

def runJsonOption[J](F: Sync[F], A: Absorbable[O], facade: Facade[J]): F[Option[J]]

Parses the source to a single JSON optional JSON value.

Parses the source to a single JSON optional JSON value.

Type Params
J

the JSON AST to return

Value Params
facade

the Jawn facade to materialize J

Returns

some parsed JSON value, or None if the source is empty

def unwrapJsonArray[J](F: ApplicativeError[F, Throwable], A: Absorbable[O], facade: Facade[J]): Stream[F, J]

Emits elements of an outer JSON array as they are parsed.

Emits elements of an outer JSON array as they are parsed.

Type Params
J

the JSON AST to return

Value Params
facade

the Jawn facade to materialize J