com.paypal.cascade.json

Unmarshallable

Related Doc: package json

implicit class Unmarshallable extends AnyRef

Implicit conversions from a JSON String to a variety of object types.

import com.paypal.cascade.json._
"""{"key":"value"}""".toMap
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Unmarshallable
  2. AnyRef
  3. Any
Implicitly
  1. by Marshallable
  2. by Convertible
  3. by any2stringadd
  4. by StringFormat
  5. by Ensuring
  6. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Unmarshallable(str: String)

    str

    this String

Value Members

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

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

    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to any2stringadd[Unmarshallable] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Unmarshallable, B)

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to ArrowAssoc[Unmarshallable] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

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

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def convertValue[T](implicit arg0: Manifest[T]): Try[T]

    Convert an arbitrary JSON object to a T, where T is some context bound type.

    Convert an arbitrary JSON object to a T, where T is some context bound type. Useful for secondary JSON conversion, e.g. for polymorphic data members. A direct use-case is in JSON-Patch, where the expected value may be any of a raw value (String, Int, etc.), a full JSON object, or nothing.

    T

    a context bound type

    returns

    a scala.util.Try that is either the object of type T, or a java.lang.IllegalArgumentException in the case of a cast to an incompatible type.

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to Convertible performed by method Convertible in com.paypal.cascade.json.
    Definition Classes
    Convertible
    Note

    Discovered via testing, this method does not play well with Optional data stored in Any fields. If you know that you need to serialize Optional values, please state them as Optional in their type declaration, e.g. in the example here with Foo and Bar. If a None is serialized in an object with an Any field, and you try to convert this as an Option, it will instead come out as a null value and you will have to post-process it as such. Instead, if the field is declared as a Option[Any] and a None is serialized, it will correctly be converted here as a None.

    ,

    This proxy method exists as an alternative to exposing the entire private mapper through a getInstance or copy method, so that the mapper remains a strict singleton and its configuration remains obscured. Otherwise, this is a direct proxy of the mapper.convertValue method from ScalaObjectMapper in Jackson, with added exception catching.

    ,

    In general, Unmarshallable.fromJson should be preferred for String-to-Object conversion. This method is intended for secondary conversion after Unmarshallable.fromJson has been applied.

  9. def ensuring(cond: (Unmarshallable) ⇒ Boolean, msg: ⇒ Any): Unmarshallable

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to Ensuring[Unmarshallable] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (Unmarshallable) ⇒ Boolean): Unmarshallable

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to Ensuring[Unmarshallable] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): Unmarshallable

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to Ensuring[Unmarshallable] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): Unmarshallable

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to Ensuring[Unmarshallable] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to StringFormat[Unmarshallable] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  17. def fromJson[T](implicit arg0: Manifest[T]): Try[T]

    Convert a JSON string to a T, where T is some context bound type.

    Convert a JSON string to a T, where T is some context bound type.

    T

    a context bound type

    returns

    a scala.util.Try that is either the object of type T, or one of java.io.IOException, com.fasterxml.jackson.core.JsonParseException, or com.fasterxml.jackson.databind.JsonMappingException

  18. final def getClass(): Class[_]

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

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

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

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

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

    Definition Classes
    AnyRef
  25. def toJson: Try[String]

    Convert an object to a JSON string representation.

    Convert an object to a JSON string representation.

    returns

    a scala.util.Try that is either the JSON string representation, or a com.fasterxml.jackson.core.JsonProcessingException

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to Marshallable[Unmarshallable] performed by method Marshallable in com.paypal.cascade.json.
    Definition Classes
    Marshallable
  26. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. def [B](y: B): (Unmarshallable, B)

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to ArrowAssoc[Unmarshallable] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion Marshallable from Unmarshallable to Marshallable[Unmarshallable]

Inherited by implicit conversion Convertible from Unmarshallable to Convertible

Inherited by implicit conversion any2stringadd from Unmarshallable to any2stringadd[Unmarshallable]

Inherited by implicit conversion StringFormat from Unmarshallable to StringFormat[Unmarshallable]

Inherited by implicit conversion Ensuring from Unmarshallable to Ensuring[Unmarshallable]

Inherited by implicit conversion ArrowAssoc from Unmarshallable to ArrowAssoc[Unmarshallable]

Ungrouped