fs2.data.json.codec

Type members

Classlikes

trait Deserializer[A]

Tells how some Json AST is deserialized into some value.

Tells how some Json AST is deserialized into some value.

Companion:
object
Source:
Deserializer.scala
Companion:
class
Source:
Deserializer.scala
trait Serializer[A]

Tells how a value is serialized into Json.

Tells how a value is serialized into Json.

Companion:
object
Source:
Serializer.scala
object Serializer
Companion:
class
Source:
Serializer.scala

Value members

Concrete methods

def deserialize[F[_], A](implicit F: RaiseThrowable[F], deserializer: Deserializer[A]): (F, Token) => A

Transforms a stream of Json tokens into a stream of deserialized values.

Transforms a stream of Json tokens into a stream of deserialized values.

Source:
package.scala
def serialize[F[_], A](implicit serializer: Serializer[A]): (F, A) => Token

Transforms a stream of values into a stream of Json tokens.

Transforms a stream of values into a stream of Json tokens.

This operation is the opposite of deserialize.

Source:
package.scala
def transform[F[_], A, B, Json](selector: Selector, f: A => B)(implicit F: RaiseThrowable[F], deserializer: Aux[A, Json], serializer: Aux[B, Json]): (F, Token) => Token

Transforms a stream of token into another one. The transformation function f is called on every selected value from upstream, and the resulting value replaces it. The rest of the stream is left unchanged.

Transforms a stream of token into another one. The transformation function f is called on every selected value from upstream, and the resulting value replaces it. The rest of the stream is left unchanged.

This operator locally deserializes the Json values using the Deserializer, and returns tokens as emitted by the Serializer on the resulting value.

Source:
package.scala
def transformF[F[_], A, B, Json](selector: Selector, f: A => F[B])(implicit F: RaiseThrowable[F], deserializer: Aux[A, Json], serializer: Aux[B, Json]): (F, Token) => Token

Transforms a stream of token into another one. The transformation function f is called on every selected value from upstream, and the resulting value replaces it. The rest of the stream is left unchanged. The operation can fail, in case the returned F is failed at one step.

Transforms a stream of token into another one. The transformation function f is called on every selected value from upstream, and the resulting value replaces it. The rest of the stream is left unchanged. The operation can fail, in case the returned F is failed at one step.

This operator locally deserializes Json values using the Deserializer, and returns tokens as emitted by the Serializer on the resulting value.

Source:
package.scala
def transformOpt[F[_], A, B, Json](selector: Selector, f: A => Option[B])(implicit F: RaiseThrowable[F], deserializer: Aux[A, Json], serializer: Aux[B, Json]): (F, Token) => Token

Transforms a stream of token into another one. The transformation function f is called on every selected value from upstream, and the resulting value replaces it. If the function returns None, then the entire value is dropped (and the object key it is located at, if any). The rest of the stream is left unchanged.

Transforms a stream of token into another one. The transformation function f is called on every selected value from upstream, and the resulting value replaces it. If the function returns None, then the entire value is dropped (and the object key it is located at, if any). The rest of the stream is left unchanged.

This operator locally deserializes Json values using the Deserializer, and returns tokens as emitted by the Serializer on the resulting value.

Source:
package.scala
def transformOptF[F[_], A, B, Json](selector: Selector, f: A => F[Option[B]])(implicit F: RaiseThrowable[F], deserializer: Aux[A, Json], serializer: Aux[B, Json]): (F, Token) => Token

Transforms a stream of token into another one. The transformation function f is called on every selected value from upstream, and the resulting value replaces it. The rest of the stream is left unchanged. The operation can fail, in case the returned F is failed at one step.

Transforms a stream of token into another one. The transformation function f is called on every selected value from upstream, and the resulting value replaces it. The rest of the stream is left unchanged. The operation can fail, in case the returned F is failed at one step.

This operator locally deserializes Json values using the Deserializer, and returns tokens as emitted by the Serializer on the resulting value.

Source:
package.scala