com.paypal.cascade.json

Unmarshallable

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 any2stringfmt
  5. by any2ArrowAssoc
  6. by any2Ensuring
  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: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

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

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. 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.

  11. 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 any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (Unmarshallable) ⇒ Boolean): Unmarshallable

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to Ensuring[Unmarshallable] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. 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 any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): Unmarshallable

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

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

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

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

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  19. 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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  27. 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
  28. def toString(): String

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

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

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

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

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

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (unmarshallable: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (unmarshallable: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: Unmarshallable

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to ArrowAssoc[Unmarshallable] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (unmarshallable: ArrowAssoc[Unmarshallable]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: Unmarshallable

    Implicit information
    This member is added by an implicit conversion from Unmarshallable to Ensuring[Unmarshallable] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (unmarshallable: Ensuring[Unmarshallable]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

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 StringAdd

Inherited by implicit conversion any2stringfmt from Unmarshallable to StringFormat

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

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

Ungrouped