uPickle message codec customization for JSON format.
Provides basic null-safe data types and RPC protocol message support.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait UpickleCustomtrait AttributeTaggedtrait Apitrait MsgReadWriterstrait JsReadWriterstrait LowPriReadWriterstrait MacroImplicitstrait WebJsontrait Writerstrait LowPriWriterstrait WritersVersionSpecifictrait Readerstrait ReadersVersionSpecifictrait CaseClassReadWriterstrait Annotatortrait MacrosCommontrait Configtrait Generatedtrait TupleReadWriterstrait Typesclass Objecttrait Matchableclass AnyShow all
Members list
Type members
Inherited classlikes
Attributes
- Inherited from:
- CaseClassReadWriters
- Supertypes
- Known subtypes
-
class CaseClassReader3[T]class SingletonReader[T]
Attributes
- Inherited from:
- ReadersVersionSpecific
- Supertypes
-
class CaseClassReader[T]trait SimpleReader[T]trait Reader[T]class Objecttrait Matchableclass AnyShow all
Attributes
- Inherited from:
- CaseClassReadWriters
- Supertypes
-
trait ObjectWriter[V]trait Writer[V]trait Transformer[V]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class SingletonWriter[T]
Attributes
- Inherited from:
- Readers
- Supertypes
Attributes
- Inherited from:
- Types
- Supertypes
- Known subtypes
-
trait CaseClassWriter[V]class SingletonWriter[T]
Attributes
- Inherited from:
- Writers
- Supertypes
Attributes
- Inherited from:
- Types
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Types
- Supertypes
-
trait Writer[T]trait Transformer[T]trait Reader[T]class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
trait TaggedReadWriter[T]
Attributes
- Inherited from:
- MacroImplicits
- Supertypes
-
class Objecttrait Matchableclass Any
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
- Known subtypes
-
trait OptionReader[T]trait ReadWriter[T]trait TaggedReadWriter[T]trait SimpleReader[T]class CaseClassReader[V]class CaseClassReader3[T]class SingletonReader[T]trait NumericReader[T]trait SimpleStringReader[T]trait TaggedReader[T]class TupleNReader[V]Show all
Attributes
- Inherited from:
- ReadersVersionSpecific
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Readers
- Supertypes
-
class Objecttrait Matchableclass AnyShow all
Attributes
- Inherited from:
- Writers
- Supertypes
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
- Known subtypes
-
class CaseClassReader[V]class CaseClassReader3[T]class SingletonReader[T]trait NumericReader[T]trait SimpleStringReader[T]trait TaggedReadWriter[T]trait TaggedReader[T]class TupleNReader[V]Show all
Attributes
- Inherited from:
- Readers
- Supertypes
Attributes
- Inherited from:
- CaseClassReadWriters
- Supertypes
-
class CaseClassReader[T]trait SimpleReader[T]trait Reader[T]class Objecttrait Matchableclass AnyShow all
Attributes
- Inherited from:
- CaseClassReadWriters
- Supertypes
-
trait CaseClassWriter[T]trait ObjectWriter[T]trait Writer[T]trait Transformer[T]class Objecttrait Matchableclass AnyShow all
Attributes
- Inherited from:
- Types
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Types
- Supertypes
-
trait TaggedWriter[T]trait TaggedReader[T]trait SimpleReader[T]trait ReadWriter[T]trait Writer[T]trait Transformer[T]trait Reader[T]class Objecttrait Matchableclass AnyShow all
Attributes
- Inherited from:
- Types
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Types
- Supertypes
- Known subtypes
-
trait TaggedReadWriter[T]
Attributes
- Inherited from:
- Types
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Types
- Supertypes
- Known subtypes
-
trait TaggedReadWriter[T]
Attributes
- Inherited from:
- TupleReadWriters
- Supertypes
Attributes
- Inherited from:
- TupleReadWriters
- Supertypes
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
- Known subtypes
-
trait ObjectWriter[T]trait CaseClassWriter[V]class SingletonWriter[T]trait OptionWriter[T]trait ReadWriter[T]trait TaggedReadWriter[T]trait SimpleMapKeyWriter[T]trait TaggedWriter[T]class TupleNWriter[V]Show all
Attributes
- Inherited from:
- WritersVersionSpecific
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Inherited methods
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Configure whether you want upickle to skip unknown keys during de-serialization of case class
es. Can be overriden for the entire serializer via override def
, and further overriden for individual case class
es via the annotation @upickle.implicits.allowUnknownKeys(b: Boolean)
Configure whether you want upickle to skip unknown keys during de-serialization of case class
es. Can be overriden for the entire serializer via override def
, and further overriden for individual case class
es via the annotation @upickle.implicits.allowUnknownKeys(b: Boolean)
Attributes
- Inherited from:
- Config
Attributes
- Definition Classes
- Inherited from:
- AttributeTagged
Attributes
- Definition Classes
- Inherited from:
- AttributeTagged
Attributes
- Inherited from:
- Annotator
Attributes
- Inherited from:
- ReadersVersionSpecific
Attributes
- Inherited from:
- MacroImplicits
Attributes
- Inherited from:
- MacroImplicits
Attributes
- Inherited from:
- WritersVersionSpecific
Attributes
- Inherited from:
- WritersVersionSpecific
Transform dictionary keys when writing case class
es 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 class
es 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 class
es 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
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
Transforms the value of the $type
field when writing sealed trait
s, 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 trait
s, 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 class
es 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 class
es and case object
s 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 class
es and case object
s 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
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
Whether top-level Some(t)
s and None
s 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 None
s 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
Reads the given JSON input into a Scala value
Reads the given MessagePack input into a Scala value
Attributes
- Inherited from:
- Api
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
Write the given Scala value as a JSON string via a geny.Writable
Write the given Scala value as a MessagePack binary via a geny.Writable
Write the given Scala value as a MessagePack binary via a geny.Writable
Attributes
- Inherited from:
- Api
Mark a ReadWriter[T]
as something that can be used as a key in a JSON dictionary, such that Map[T, V]
serializes to {"a": "b", "c": "d"}
rather than [["a", "b"], ["c", "d"]]
Mark a ReadWriter[T]
as something that can be used as a key in a JSON dictionary, such that Map[T, V]
serializes to {"a": "b", "c": "d"}
rather than [["a", "b"], ["c", "d"]]
Attributes
- Inherited from:
- Api
Mark a Writer[T]
as something that can be used as a key in a JSON dictionary, such that Map[T, V]
serializes to {"a": "b", "c": "d"}
rather than [["a", "b"], ["c", "d"]]
Mark a Writer[T]
as something that can be used as a key in a JSON dictionary, such that Map[T, V]
serializes to {"a": "b", "c": "d"}
rather than [["a", "b"], ["c", "d"]]
Attributes
- Inherited from:
- Api
Specifies the name of the field used to distinguish different case class
es 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:
- Types
Attributes
- Inherited from:
- AttributeTagged
Attributes
- Definition Classes
-
AttributeTagged.this.isTagName(taggedReader.tagKey,t._1))).getOrElse[Tuple2[BufferedValue,BufferedValue]](thrownewAbort(missingKeyMsg))._2 valkey:String=keyAttr.asInstanceOf[BufferedValue.Str].value0.toString() valdelegate:Reader[T]=taggedReader.findReader(key) if(delegate.==(null))thrownewAbortException("invalidtagfortaggedobject:".+(key),keyAttr.index,-1,-1,null)else() valctx2:ObjVisitor[Any,T]=delegate.visitObject(-1,true,-1) x.value0.foreach[Unit](((p:Tuple2[BufferedValue,BufferedValue])=>{ val$1$:Tuple2[BufferedValue,BufferedValue]=(p:Tuple2[BufferedValue,BufferedValue]@unchecked)match{ caseTuple2(k0,v)=> Tuple2.apply[BufferedValue,BufferedValue](k0,`v₂`) } val`k0₂`:BufferedValue=$1$._1 val`v₃`:BufferedValue=$1$._2 valk:BufferedValue=`k0₂` if(AttributeTagged.this.isTagName(taggedReader.tagKey,k).unary_!){ val`keyVisitor₂`:Visitor[_>:Nothing<:Any,_>:Nothing<:Any]=ctx2.visitKey(-1) ctx2.visitKeyValue(BufferedValue.transform[Any](k,`keyVisitor₂`)) ctx2.visitValue(BufferedValue.transform[Any](`v₃`,ctx2.subVisitor),-1) }else() })) ctx2.visitEnd(`index₄`) } } } (new$anon():ObjVisitor[Any,T]) }">AttributeTagged -> Types
- Inherited from:
- AttributeTagged.this.isTagName(taggedReader.tagKey,t._1))).getOrElse[Tuple2[BufferedValue,BufferedValue]](thrownewAbort(missingKeyMsg))._2 valkey:String=keyAttr.asInstanceOf[BufferedValue.Str].value0.toString() valdelegate:Reader[T]=taggedReader.findReader(key) if(delegate.==(null))thrownewAbortException("invalidtagfortaggedobject:".+(key),keyAttr.index,-1,-1,null)else() valctx2:ObjVisitor[Any,T]=delegate.visitObject(-1,true,-1) x.value0.foreach[Unit](((p:Tuple2[BufferedValue,BufferedValue])=>{ val$1$:Tuple2[BufferedValue,BufferedValue]=(p:Tuple2[BufferedValue,BufferedValue]@unchecked)match{ caseTuple2(k0,v)=> Tuple2.apply[BufferedValue,BufferedValue](k0,`v₂`) } val`k0₂`:BufferedValue=$1$._1 val`v₃`:BufferedValue=$1$._2 valk:BufferedValue=`k0₂` if(AttributeTagged.this.isTagName(taggedReader.tagKey,k).unary_!){ val`keyVisitor₂`:Visitor[_>:Nothing<:Any,_>:Nothing<:Any]=ctx2.visitKey(-1) ctx2.visitKeyValue(BufferedValue.transform[Any](k,`keyVisitor₂`)) ctx2.visitValue(BufferedValue.transform[Any](`v₃`,ctx2.subVisitor),-1) }else() })) ctx2.visitEnd(`index₄`) } } } (new$anon():ObjVisitor[Any,T]) }">AttributeTagged
Attributes
- Definition Classes
- Inherited from:
- AttributeTagged
Write the given Scala value as a JSON string
Write the given Scala value as a MessagePack binary
Write the given Scala value as a MessagePack binary to the given OutputStream
Write the given Scala value as a MessagePack binary to the given OutputStream
Attributes
- Inherited from:
- Api
Attributes
- Inherited from:
- Api
Write the given Scala value as a JSON struct
Write the given Scala value as a MessagePack struct
Write the given Scala value as a JSON string to the given Writer
Attributes
- Inherited from:
- Api
Attributes
- Inherited from:
- Api
Inherited fields
Attributes
- Inherited from:
- MacrosCommon
Givens
Inherited givens
Attributes
- Inherited from:
- ReadersVersionSpecific
Attributes
- Inherited from:
- WritersVersionSpecific
Implicits
Implicits
Inherited implicits
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- UpickleCustom
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- UpickleCustom
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- UpickleCustom
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- UpickleCustom
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- UpickleCustom
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- UpickleCustom
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- JsReadWriters
Attributes
- Inherited from:
- LowPriReadWriters
Attributes
- Inherited from:
- LowPriReadWriters
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- UpickleCustom
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- MsgReadWriters
Attributes
- Inherited from:
- MsgReadWriters
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Definition Classes
- Inherited from:
- UpickleCustom
Attributes
- Definition Classes
- Inherited from:
- UpickleCustom
Attributes
- Inherited from:
- MacroImplicits
Attributes
- Inherited from:
- ReadersVersionSpecific
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- LowPriWriters
Attributes
- Inherited from:
- UpickleCustom
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Generated
Attributes
- Inherited from:
- Readers
Attributes
- Inherited from:
- Writers
Attributes
- Inherited from:
- UpickleCustom
Attributes
- Inherited from:
- WritersVersionSpecific