WritersVersionSpecific

upickle.implicits.WritersVersionSpecific
trait WritersVersionSpecific extends MacrosCommon, Types, Annotator, CaseClassReadWriters

Attributes

Graph
Supertypes
trait Annotator
trait MacrosCommon
trait Types
trait Config
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Writers

Members list

Type members

Classlikes

implicit class WriterExtension(r: Types.this.Writer.type)

Attributes

Supertypes
class Object
trait Matchable
class Any

Inherited classlikes

trait CaseClassWriter[V] extends ObjectWriter[V]

Attributes

Inherited from:
CaseClassReadWriters
Supertypes
trait ObjectWriter[V]
trait Writer[V]
trait Transformer[V]
class Object
trait Matchable
class Any
Show all
Known subtypes
class SingletonWriter[T]
trait ObjectWriter[T] extends Writer[T]

Attributes

Inherited from:
Types
Supertypes
trait Writer[T]
trait Transformer[T]
class Object
trait Matchable
class Any
Known subtypes
trait CaseClassWriter[V]
class SingletonWriter[T]
object ReadWriter

Attributes

Inherited from:
Types
Supertypes
class Object
trait Matchable
class Any
trait ReadWriter[T] extends Reader[T], Writer[T]

A combined Reader and Writer, along with some utility methods.

A combined Reader and Writer, along with some utility methods.

Attributes

Inherited from:
Types
Supertypes
trait Writer[T]
trait Transformer[T]
trait Reader[T]
trait Visitor[Any, T]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait TaggedReadWriter[T]
object Reader

Attributes

Inherited from:
Types
Supertypes
class Object
trait Matchable
class Any
trait Reader[T] extends Visitor[Any, T]

Represents the ability to read a value of type T.

Represents the ability to read a value of type T.

A thin wrapper around Visitor, but needs to be it's own class in order to make type inference automatically pick up it's implicit values.

Attributes

Inherited from:
Types
Supertypes
trait Visitor[Any, T]
class Object
trait Matchable
class Any
Known subtypes
trait ReadWriter[T]
trait TaggedReadWriter[T]
trait SimpleReader[T]
class CaseClassReader[V]
class SingletonReader[T]
class CaseClassReader3[T]
trait TaggedReader[T]
class TupleNReader[V]
trait NumericReader[T]
class SeqLikeReader[C, T]
trait OptionReader[T]
Show all
trait SimpleReader[T] extends Reader[T], SimpleVisitor[Any, T]

A Reader that throws an error for all the visit methods which it does not define, letting you only define the handlers you care about.

A Reader that throws an error for all the visit methods which it does not define, letting you only define the handlers you care about.

Attributes

Inherited from:
Types
Supertypes
trait SimpleVisitor[Any, T]
trait Reader[T]
trait Visitor[Any, T]
class Object
trait Matchable
class Any
Show all
Known subtypes
class CaseClassReader[V]
class SingletonReader[T]
class CaseClassReader3[T]
trait TaggedReadWriter[T]
trait TaggedReader[T]
class TupleNReader[V]
trait NumericReader[T]
class SeqLikeReader[C, T]
Show all
class SingletonReader[T](t: T) extends CaseClassReader[T]

Attributes

Inherited from:
CaseClassReadWriters
Supertypes
class CaseClassReader[T]
trait SimpleReader[T]
trait SimpleVisitor[Any, T]
trait Reader[T]
trait Visitor[Any, T]
class Object
trait Matchable
class Any
Show all
class SingletonWriter[T](f: T) extends CaseClassWriter[T]

Attributes

Inherited from:
CaseClassReadWriters
Supertypes
trait CaseClassWriter[T]
trait ObjectWriter[T]
trait Writer[T]
trait Transformer[T]
class Object
trait Matchable
class Any
Show all

Attributes

Inherited from:
Types
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
Types
Supertypes
trait TaggedWriter[T]
trait TaggedReader[T]
trait SimpleReader[T]
trait SimpleVisitor[Any, T]
trait ReadWriter[T]
trait Writer[T]
trait Transformer[T]
trait Reader[T]
trait Visitor[Any, T]
class Object
trait Matchable
class Any
Show all
object TaggedReader

Attributes

Inherited from:
Types
Supertypes
class Object
trait Matchable
class Any
trait TaggedReader[T] extends SimpleReader[T]

Attributes

Inherited from:
Types
Supertypes
trait SimpleReader[T]
trait SimpleVisitor[Any, T]
trait Reader[T]
trait Visitor[Any, T]
class Object
trait Matchable
class Any
Show all
Known subtypes
trait TaggedReadWriter[T]
object TaggedWriter

Attributes

Inherited from:
Types
Supertypes
class Object
trait Matchable
class Any
trait TaggedWriter[T] extends Writer[T]

Attributes

Inherited from:
Types
Supertypes
trait Writer[T]
trait Transformer[T]
class Object
trait Matchable
class Any
Known subtypes
trait TaggedReadWriter[T]
object Writer

Attributes

Inherited from:
Types
Supertypes
class Object
trait Matchable
class Any
trait Writer[T] extends Transformer[T]

Represents the ability to write a value of type T.

Represents the ability to write a value of type T.

Generally nothing more than a way of applying the T to a Visitor, along with some utility methods

Attributes

Inherited from:
Types
Supertypes
trait Transformer[T]
class Object
trait Matchable
class Any
Known subtypes
trait ObjectWriter[T]
trait CaseClassWriter[V]
class SingletonWriter[T]
trait ReadWriter[T]
trait TaggedReadWriter[T]
trait TaggedWriter[T]
class TupleNWriter[V]
trait OptionWriter[T]
Show all

Inherited and Abstract classlikes

abstract class CaseClassReader[V] extends SimpleReader[V]

Attributes

Inherited from:
CaseClassReadWriters
Supertypes
trait SimpleReader[V]
trait SimpleVisitor[Any, V]
trait Reader[V]
trait Visitor[Any, V]
class Object
trait Matchable
class Any
Show all
Known subtypes

Value members

Concrete methods

inline def macroW[T : ClassTag](implicit evidence$1: ClassTag[T], m: Of[T]): Writer[T]
inline def macroWAll[T : ClassTag](implicit evidence$1: ClassTag[T], m: Of[T]): Writer[T]

Inherited methods

def allowUnknownKeys: Boolean

Configure whether you want upickle to skip unknown keys during de-serialization of case classes. Can be overriden for the entire serializer via override def, and further overriden for individual case classes via the annotation @upickle.implicits.allowUnknownKeys(b: Boolean)

Configure whether you want upickle to skip unknown keys during de-serialization of case classes. Can be overriden for the entire serializer via override def, and further overriden for individual case classes via the annotation @upickle.implicits.allowUnknownKeys(b: Boolean)

Attributes

Inherited from:
Config
def annotate[V](rw: ObjectWriter[V], key: String, value: String, shortValue: String)(implicit ct: ClassTag[V]): TaggedWriter[V]

Attributes

Inherited from:
Annotator
def objectAttributeKeyReadMap(s: CharSequence): CharSequence

Transform dictionary keys when writing case classes when reading. Can be overriden to provide custom mappings between Scala field names and JSON field names. Needs to be kept in sync with objectAttributeKeyWriteMap

Transform dictionary keys when writing case classes when reading. Can be overriden to provide custom mappings between Scala field names and JSON field names. Needs to be kept in sync with objectAttributeKeyWriteMap

This customizes the mapping across all case classes fields handled by this upickle instance. This can be customized on a field-by-field basis using the upickle.implicits.key annotation on the case class field

Attributes

Inherited from:
Config
def objectAttributeKeyWriteMap(s: CharSequence): CharSequence

Map the name of JSON object fields to Scala case class fields during serialization. Must be kept in sync with objectAttributeKeyReadMap

Map the name of JSON object fields to Scala case class fields during serialization. Must be kept in sync with objectAttributeKeyReadMap

Attributes

Inherited from:
Config
def objectTypeKeyReadMap(s: CharSequence): CharSequence

Transforms the value of the $type field when writing sealed traits, to allow custom mapping between the case class name and the $type field in the generated JSON. Must be kept in sync with objectTypeKeyWriteMap.

Transforms the value of the $type field when writing sealed traits, to allow custom mapping between the case class name and the $type field in the generated JSON. Must be kept in sync with objectTypeKeyWriteMap.

  • This customizes the mapping across all case classes fields handled by this
  • upickle instance. This can be customized on a per-sealed trait basis using the
  • upickle.implicits.key annotation on the case class

Attributes

Inherited from:
Config

Whether to use the fully-qualified name of case classes and case objects which are part of sealed trait hierarchies when serializing them and writing their $type key. Defaults to false, so $type key uses the shortest partially-qualified name. Can be set to true to use their fully-qualified name.

Whether to use the fully-qualified name of case classes and case objects which are part of sealed trait hierarchies when serializing them and writing their $type key. Defaults to false, so $type key uses the shortest partially-qualified name. Can be set to true to use their fully-qualified name.

Attributes

Inherited from:
Config
def objectTypeKeyWriteMap(s: CharSequence): CharSequence

Map the name of Scala case class type names to JSON $type field value during serialization. Must be kept in sync with objectTypeKeyReadMap

Map the name of Scala case class type names to JSON $type field value during serialization. Must be kept in sync with objectTypeKeyReadMap

Attributes

Inherited from:
Config
def optionsAsNulls: Boolean

Whether top-level Some(t)s and Nones are serialized unboxed as t or null, rather than [t] or []. This is generally what people expect, although it does cause issues where Some(null) when serialized and de-serialized can become None. Can be disabled to use the boxed serialization format as 0-or-1-element-arrays, presering round trip-ability at the expense of un-intuitiveness and verbosity

Whether top-level Some(t)s and Nones are serialized unboxed as t or null, rather than [t] or []. This is generally what people expect, although it does cause issues where Some(null) when serialized and de-serialized can become None. Can be disabled to use the boxed serialization format as 0-or-1-element-arrays, presering round trip-ability at the expense of un-intuitiveness and verbosity

Attributes

Inherited from:
Config
def serializeDefaults: Boolean

Whether or not to write case class keys which match their default values. Defaults to false, allowing those keys to be omitted. Can be set to true to always write field values even if they are equal to the default

Whether or not to write case class keys which match their default values. Defaults to false, allowing those keys to be omitted. Can be set to true to always write field values even if they are equal to the default

Attributes

Inherited from:
Config
def tagName: String

Specifies the name of the field used to distinguish different case classes under a sealed trait. Defaults to $type, but can be configured globally by overriding tagName, or on a per-sealed trait basis via the @key annotation

Specifies the name of the field used to distinguish different case classes under a sealed trait. Defaults to $type, but can be configured globally by overriding tagName, or on a per-sealed trait basis via the @key annotation

Attributes

Inherited from:
Config
def taggedArrayContext[T](taggedReader: TaggedReader[T], index: Int): ArrVisitor[Any, T]

Attributes

Inherited from:
Types
def taggedObjectContext[T](taggedReader: TaggedReader[T], index: Int): ObjVisitor[Any, T]

Attributes

Inherited from:
Types

Inherited and Abstract methods

def annotate[V](rw: ObjectWriter[V], key: String, value: String, shortValue: String, checker: Checker): TaggedWriter[V]

Attributes

Inherited from:
Annotator
def annotate[V](rw: Reader[V], key: String, value: String, shortValue: String): TaggedReader[V]

Attributes

Inherited from:
Annotator
def taggedExpectedMsg: String

Attributes

Inherited from:
Types
def taggedWrite[T, R](w: ObjectWriter[T], tagKey: String, tagValue: String, out: Visitor[_, R], v: T): R

Attributes

Inherited from:
Types

Inherited fields

Attributes

Inherited from:
MacrosCommon

Givens

Givens

inline given superTypeWriter[T : ProductOf, V >: T : SumOf](implicit evidence$1: ProductOf[T], evidence$2: ClassTag[T], evidence$3: Writer[V], evidence$4: SumOf[V], NotGiven[CurrentlyDeriving[V]]): Writer[T]

Implicits

Implicits

final implicit def WriterExtension(r: Writer.type): WriterExtension