wrap

fs2.data.json.package$.wrap$
object wrap

A collection of pipes to wrap streams inside objects.

Attributes

Source
package.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
wrap.type

Members list

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.

Attributes

Source
package.scala
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.

Attributes

Source
package.scala
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.

Attributes

Source
package.scala