object Unmarshaller extends GenericUnmarshallers with PredefinedFromEntityUnmarshallers with PredefinedFromStringUnmarshallers
- Source
- Unmarshaller.scala
- Alphabetic
- By Inheritance
- Unmarshaller
- PredefinedFromStringUnmarshallers
- PredefinedFromEntityUnmarshallers
- MultipartUnmarshallers
- GenericUnmarshallers
- LowerPriorityGenericUnmarshallers
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
final
case class
EitherUnmarshallingException(rightClass: Class[_], right: Throwable, leftClass: Class[_], left: Throwable) extends RuntimeException with Product with Serializable
Order of parameters (
right
first,left
second) is intentional, since that's the order we evaluate them in. - implicit final class EnhancedFromEntityUnmarshaller[A] extends AnyVal
- implicit final class EnhancedUnmarshaller[A, B] extends AnyVal
-
final
class
UnsupportedContentTypeException extends RuntimeException with Product with Serializable
Signals that unmarshalling failed because the entity content-type did not match one of the supported ranges.
Signals that unmarshalling failed because the entity content-type did not match one of the supported ranges. This error cannot be thrown by custom code, you need to use the
forContentTypes
modifier on a base akka.http.scaladsl.unmarshalling.Unmarshaller instead.
Value Members
-
implicit
def
CsvSeq[T](implicit unmarshaller: Unmarshaller[String, T]): Unmarshaller[String, Seq[T]]
- Definition Classes
- PredefinedFromStringUnmarshallers
-
val
HexByte: Unmarshaller[String, Byte]
- Definition Classes
- PredefinedFromStringUnmarshallers
-
val
HexInt: Unmarshaller[String, Int]
- Definition Classes
- PredefinedFromStringUnmarshallers
-
val
HexLong: Unmarshaller[String, Long]
- Definition Classes
- PredefinedFromStringUnmarshallers
-
val
HexShort: Unmarshaller[String, Short]
- Definition Classes
- PredefinedFromStringUnmarshallers
-
implicit
def
_fromStringUnmarshallerFromByteStringUnmarshaller[T](implicit bsum: FromByteStringUnmarshaller[T]): Unmarshaller[String, T]
- Definition Classes
- PredefinedFromStringUnmarshallers
-
def
apply[A, B](f: (ExecutionContext) ⇒ (A) ⇒ Future[B]): Unmarshaller[A, B]
Creates an
Unmarshaller
from the given function. -
def
bestUnmarshallingCharsetFor(entity: HttpEntity): HttpCharset
Returns the best charset for unmarshalling the given entity to a character-based representation.
Returns the best charset for unmarshalling the given entity to a character-based representation. Falls back to UTF-8 if no better alternative can be determined.
-
implicit
val
booleanFromStringUnmarshaller: Unmarshaller[String, Boolean]
- Definition Classes
- PredefinedFromStringUnmarshallers
-
implicit
def
byteArrayUnmarshaller: FromEntityUnmarshaller[Array[Byte]]
- Definition Classes
- PredefinedFromEntityUnmarshallers
-
implicit
val
byteFromStringUnmarshaller: Unmarshaller[String, Byte]
- Definition Classes
- PredefinedFromStringUnmarshallers
-
implicit
def
byteStringUnmarshaller: FromEntityUnmarshaller[ByteString]
- Definition Classes
- PredefinedFromEntityUnmarshallers
-
implicit
def
charArrayUnmarshaller: FromEntityUnmarshaller[Array[Char]]
- Definition Classes
- PredefinedFromEntityUnmarshallers
-
implicit
def
defaultMultipartByteRangesUnmarshaller(implicit log: LoggingAdapter = NoLogging, parserSettings: ParserSettings = null): FromEntityUnmarshaller[ByteRanges]
- Definition Classes
- MultipartUnmarshallers
-
implicit
def
defaultMultipartGeneralUnmarshaller(implicit log: LoggingAdapter = NoLogging, parserSettings: ParserSettings = null): FromEntityUnmarshaller[General]
- Definition Classes
- MultipartUnmarshallers
-
implicit
def
defaultUrlEncodedFormDataUnmarshaller: FromEntityUnmarshaller[FormData]
- Definition Classes
- PredefinedFromEntityUnmarshallers
-
implicit
val
doubleFromStringUnmarshaller: Unmarshaller[String, Double]
- Definition Classes
- PredefinedFromStringUnmarshallers
-
implicit
def
eitherUnmarshaller[L, R](implicit ua: FromEntityUnmarshaller[L], rightTag: ClassTag[R], ub: FromEntityUnmarshaller[R], leftTag: ClassTag[L]): FromEntityUnmarshaller[Either[L, R]]
Enables using Either to encode the following unmarshalling logic: Attempt unmarshalling the entity as as
R
first (yieldingR
), and if it fails attempt unmarshalling asL
(yieldingLeft
).Enables using Either to encode the following unmarshalling logic: Attempt unmarshalling the entity as as
R
first (yieldingR
), and if it fails attempt unmarshalling asL
(yieldingLeft
).The either unmarshaller only works with strict entities, so make sure to wrap routes that want to use it with
toStrictEntity
. Otherwise, if a non-strict entity is provided, it will fail with anIllegalArgumentException
.Note that the Either's "R" type will be attempted first (as Left is often considered as the "failed case" in Either).
- Definition Classes
- LowerPriorityGenericUnmarshallers
-
def
firstOf[A, B](unmarshallers: Unmarshaller[A, B]*): Unmarshaller[A, B]
Helper for creating a "super-unmarshaller" from a sequence of "sub-unmarshallers", which are tried in the given order.
Helper for creating a "super-unmarshaller" from a sequence of "sub-unmarshallers", which are tried in the given order. The first successful unmarshalling of a "sub-unmarshallers" is the one produced by the "super-unmarshaller".
-
implicit
val
floatFromStringUnmarshaller: Unmarshaller[String, Float]
- Definition Classes
- PredefinedFromStringUnmarshallers
- implicit def identityUnmarshaller[T]: Unmarshaller[T, T]
-
implicit
val
intFromStringUnmarshaller: Unmarshaller[String, Int]
- Definition Classes
- PredefinedFromStringUnmarshallers
-
implicit
def
liftToSourceOptionUnmarshaller[A, B](um: Unmarshaller[A, B]): Unmarshaller[Option[A], B]
- Definition Classes
- LowerPriorityGenericUnmarshallers
-
implicit
def
liftToTargetOptionUnmarshaller[A, B](um: Unmarshaller[A, B]): Unmarshaller[A, Option[B]]
- Definition Classes
- GenericUnmarshallers
-
implicit
val
longFromStringUnmarshaller: Unmarshaller[String, Long]
- Definition Classes
- PredefinedFromStringUnmarshallers
-
implicit
def
messageUnmarshallerFromEntityUnmarshaller[T](implicit um: FromEntityUnmarshaller[T]): FromMessageUnmarshaller[T]
- Definition Classes
- LowerPriorityGenericUnmarshallers
-
def
multipartByteRangesUnmarshaller(defaultCharset: HttpCharset)(implicit log: LoggingAdapter = NoLogging, parserSettings: ParserSettings = null): FromEntityUnmarshaller[ByteRanges]
- Definition Classes
- MultipartUnmarshallers
-
implicit
def
multipartFormDataUnmarshaller(implicit log: LoggingAdapter = NoLogging, parserSettings: ParserSettings = null): FromEntityUnmarshaller[FormData]
- Definition Classes
- MultipartUnmarshallers
-
def
multipartGeneralUnmarshaller(defaultCharset: HttpCharset)(implicit log: LoggingAdapter = NoLogging, parserSettings: ParserSettings = null): FromEntityUnmarshaller[General]
- Definition Classes
- MultipartUnmarshallers
-
def
multipartUnmarshaller[T <: Multipart, BP <: BodyPart, BPS <: Strict](mediaRange: MediaRange, defaultContentType: ContentType, createBodyPart: (BodyPartEntity, List[HttpHeader]) ⇒ BP, createStreamed: (Multipart, Source[BP, Any]) ⇒ T, createStrictBodyPart: (Strict, List[HttpHeader]) ⇒ BPS, createStrict: (Multipart, Seq[BPS]) ⇒ T)(implicit log: LoggingAdapter = NoLogging, parserSettings: ParserSettings = null): FromEntityUnmarshaller[T]
- Definition Classes
- MultipartUnmarshallers
-
implicit
val
shortFromStringUnmarshaller: Unmarshaller[String, Short]
- Definition Classes
- PredefinedFromStringUnmarshallers
-
implicit
def
sourceOptionUnmarshaller[A, B](implicit um: Unmarshaller[A, B]): Unmarshaller[Option[A], B]
- Definition Classes
- LowerPriorityGenericUnmarshallers
-
def
strict[A, B](f: (A) ⇒ B): Unmarshaller[A, B]
Helper for creating a synchronous
Unmarshaller
from the given function. -
implicit
def
stringUnmarshaller: FromEntityUnmarshaller[String]
- Definition Classes
- PredefinedFromEntityUnmarshallers
-
implicit
def
targetOptionUnmarshaller[A, B](implicit um: Unmarshaller[A, B]): Unmarshaller[A, Option[B]]
- Definition Classes
- GenericUnmarshallers
-
def
urlEncodedFormDataUnmarshaller(ranges: ContentTypeRange*): FromEntityUnmarshaller[FormData]
- Definition Classes
- PredefinedFromEntityUnmarshallers
-
implicit
val
uuidFromStringUnmarshaller: Unmarshaller[String, UUID]
- Definition Classes
- PredefinedFromStringUnmarshallers
- def withMaterializer[A, B](f: (ExecutionContext) ⇒ (Materializer) ⇒ (A) ⇒ Future[B]): Unmarshaller[A, B]
-
object
NoContentException extends RuntimeException with NoStackTrace with Product with Serializable
Signals that unmarshalling failed because the entity was unexpectedly empty.
- object UnsupportedContentTypeException extends Serializable