Trait/Object

com.rallyhealth.weejson.v1

BufferedValue

Related Docs: object BufferedValue | package v1

Permalink

sealed trait BufferedValue extends AnyRef

A version of com.rallyhealth.weejson.v1.Value used to buffer data in raw form.

This is used by the case class macros to buffer data for polymorphic types when the discriminator is not the first element, e.g. {"foo": 1, "$type": "discriminator"}. It is important that all types be immutable.

May be superior to use in client code as well under some circumstances, e.g., when representing data from and to non-JSON types. For example, when piped through a Value, java.time.Instant will come out the other side as visitString rather than visitTimestamp, leading to potentially wasteful parsing/formatting. Other advantages are: immutable, more efficient number representation (BigDecimal has a lot of performance overhead when applied to smaller numeric types), and direct representation of binary and extension types (without assumed JSON byte array encoding).

Most Visitor methods are represented by their own case classes. Exceptions are: - Float64String and UInt64 - along with Float64StringParts, represented as Num - Int32 - along with Int64, represented as NumLong - Float32 - along with Float64, represented as NumDouble - Char - along with String, represented as Str

Therefore, when transforming from a BufferedValue, the specific visit methods for these will never be called (e.g., for integers, visitInt32 will never be called, only visitInt64).

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BufferedValue
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped