unitEncoder

rpc.package$package.unitEncoder
object unitEncoder extends JsonEncoder[Unit]

Attributes

Graph
Supertypes
trait JsonEncoder[Unit]
trait JsonEncoderPlatformSpecific[Unit]
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def unsafeEncode(a: Unit, indent: Option[Int], out: Write): Unit

Inherited methods

final def contramap[B](f: B => Unit): JsonEncoder[B]

Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.

Returns a new encoder, with a new input type, which can be transformed to the old input type by the specified user-defined function.

Attributes

Inherited from:
JsonEncoder
final def either[B](that: => JsonEncoder[B]): JsonEncoder[Either[Unit, B]]

Returns a new encoder that can accepts an Either[A, B] to either, and uses either this encoder or the specified encoder to encode the two different types of values.

Returns a new encoder that can accepts an Either[A, B] to either, and uses either this encoder or the specified encoder to encode the two different types of values.

Attributes

Inherited from:
JsonEncoder
final def eitherWith[B, C](that: => JsonEncoder[B])(f: C => Either[Unit, B]): JsonEncoder[C]

Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.

Returns a new encoder with a new input type, which can be transformed to either the input type of this encoder, or the input type of the specified encoder, using the user-defined transformation function.

Attributes

Inherited from:
JsonEncoder
final def encodeJson(a: Unit, indent: Option[Int]): CharSequence

Encodes the specified value into a JSON string, with the specified indentation level.

Encodes the specified value into a JSON string, with the specified indentation level.

Attributes

Inherited from:
JsonEncoder
final def encodeJsonStream(a: Unit): ZStream[Any, Throwable, Char]

Encodes the specified value into a character stream.

Encodes the specified value into a character stream.

Attributes

Inherited from:
JsonEncoderPlatformSpecific
def isNothing(a: Unit): Boolean

This default may be overridden when this value may be missing within a JSON object and still be encoded.

This default may be overridden when this value may be missing within a JSON object and still be encoded.

Attributes

Inherited from:
JsonEncoder
final def narrow[B <: Unit]: JsonEncoder[B]

Returns this encoder but narrowed to the its given sub-type

Returns this encoder but narrowed to the its given sub-type

Attributes

Inherited from:
JsonEncoder
final def orElseEither[B](that: => JsonEncoder[B]): JsonEncoder[Either[Unit, B]]

Returns a new encoder that can accepts an Either[A, B] to either, and uses either this encoder or the specified encoder to encode the two different types of values. The difference with the classic either encoder is that the resulting JSON has no field Left or Right. What should be: {"Right": "John Doe"} is encoded as "John Doe"

Returns a new encoder that can accepts an Either[A, B] to either, and uses either this encoder or the specified encoder to encode the two different types of values. The difference with the classic either encoder is that the resulting JSON has no field Left or Right. What should be: {"Right": "John Doe"} is encoded as "John Doe"

Attributes

Inherited from:
JsonEncoder
def toJsonAST(a: Unit): Either[String, Json]

Converts a value to a Json AST

Converts a value to a Json AST

The default implementation encodes the value to a Json byte stream and uses decode to parse that back to an AST. Override to provide a more performant implementation.

Attributes

Inherited from:
JsonEncoder
final def zip[B](that: => JsonEncoder[B]): JsonEncoder[(Unit, B)]

Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.

Returns a new encoder that is capable of encoding a tuple containing the values of this encoder and the specified encoder.

Attributes

Inherited from:
JsonEncoder
final def zipWith[B, C](that: => JsonEncoder[B])(f: C => (Unit, B)): JsonEncoder[C]

Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.

Returns a new encoder that is capable of encoding a user-defined value, which is create from a tuple of the values of this encoder and the specified encoder, from the specified user- defined function.

Attributes

Inherited from:
JsonEncoder

Inherited fields

final val encodeJsonArrayPipeline: ZPipeline[Any, Throwable, Unit, Char]

Attributes

Inherited from:
JsonEncoderPlatformSpecific
final val encodeJsonLinesPipeline: ZPipeline[Any, Throwable, Unit, Char]

Attributes

Inherited from:
JsonEncoderPlatformSpecific