wrap

object wrap

A collection of pipes to wrap streams inside objects.

class Object
trait Matchable
class Any
wrap.type

Value members

Concrete methods

def asArrayInObject[F[_], Json](at: String, in: Map[String, Json], mapFirst: Boolean)(implicit tokenizer: Tokenizer[Json]): (F, Token) => Token

Wraps the stream elements as an array inside an object at the given at key. The object also contains the keys from the in map if any. If mapFirst is true, then the map elements are emitted first, then the stream, otherwise the stream is emitted first.

Wraps the stream elements as an array inside an object at the given at key. The object also contains the keys from the in map if any. If mapFirst is true, then the map elements are emitted first, then the stream, otherwise the stream is emitted first.

The resulting token stream is a valid single JSON object stream, iff the original stream is a valid stream of JSON values.

def asTopLevelArray[F[_]]: (F, Token) => Token

Wraps the stream elements as an array at top-level.

Wraps the stream elements as an array at top-level.

The resulting token stream is a valid single JSON array stream, iff the original stream is a valid stream of JSON values.

def asValueInObject[F[_], Json](at: String, in: Map[String, Json], mapFirst: Boolean)(implicit tokenizer: Tokenizer[Json]): (F, Token) => Token

Wraps the stream element as a single value inside an object at the given at key. The object also contains the keys from the in map if any. If mapFirst is true, then the map elements are emitted first, then the stream, otherwise the stream is emitted first.

Wraps the stream element as a single value inside an object at the given at key. The object also contains the keys from the in map if any. If mapFirst is true, then the map elements are emitted first, then the stream, otherwise the stream is emitted first.

The resulting token stream is a valid single JSON object stream, iff the original stream is a valid stream of a single JSON value.