Package

com.qvantel

jsonapi

Permalink

package jsonapi

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

Type Members

  1. sealed trait ApiError extends Throwable

    Permalink
  2. final case class ApiRoot(apiRoot: Option[Uri]) extends Product with Serializable

    Permalink
  3. trait HasId extends AnyRef

    Permalink
  4. trait Identifiable[A] extends AnyRef

    Permalink
  5. trait Includes[+A] extends AnyRef

    Permalink
  6. trait JsonApiClient[A] extends AnyRef

    Permalink
  7. trait JsonApiFormat[T] extends JsonApiReader[T] with JsonApiWriter[T] with RootJsonFormat[T]

    Permalink
    Annotations
    @implicitNotFound( ... )
  8. trait JsonApiReader[T] extends RootJsonReader[T]

    Permalink
    Annotations
    @implicitNotFound( ... )
  9. final class JsonApiResourceMacro extends JsonApiCommon

    Permalink
    Annotations
    @compileTimeOnly( ... )
  10. sealed trait JsonApiSorting extends AnyRef

    Permalink

    Very crude sorting used by JsonApiSupport marshalling bits works on raw json objects so performance won't be good

  11. trait JsonApiWriter[T] extends RootJsonWriter[T]

    Permalink
    Annotations
    @implicitNotFound( ... )
  12. sealed trait JsonEmpty extends JsonOption[Nothing]

    Permalink
  13. sealed abstract class JsonOption[+A] extends AnyRef

    Permalink

    Represents optional value with a special case for null.

    Represents optional value with a special case for null. Used for parsing data out of json where null and value not being present at all are different things (for example in the case of wanting to unset a value)

    Note

    For the most part tries to implement scala options api. Also provides .toOption to turn the maybe into a scala Option

  14. final case class JsonSome[+A](x: A) extends JsonOption[A] with Product with Serializable

    Permalink

    Class Some[A] represents existing values of type A.

  15. final class Macros extends JsonApiWriters with JsonApiReaders

    Permalink

    Contains macros used to automatically create JsonApiWriter and JsonApiFormat instances from a case class for http://jsonapi.org format.

    Contains macros used to automatically create JsonApiWriter and JsonApiFormat instances from a case class for http://jsonapi.org format.

    The JsonApiFormat it self is not yet complete. The read side returns Nothing (???) and thus will crash with scala.NotImplementedError

    In the case class you have to provide 2 implicits after of which you can create an instance of the JsonApiFormat or JsonApiWriter. Example for a case class called Individual.

    implicit val individualResourceType: ResourceType[Individual] = "individuals"
    implicit val individualPathTo: PathTo[Individual] = new PathTo[Individual] {
      private[this] val root = Path("/individuals")
      override final def self(id: String): Uri = root / id
    }
    // After these you can generate the format like this
    implicit val individualJsonFormat: JsonApiFormat[Individual] = jsonApiFormat[Individual]
    Annotations
    @compileTimeOnly( ... )
  16. trait Meta extends AnyRef

    Permalink
  17. trait MetaProfile extends AnyRef

    Permalink
  18. type NameMangler = (String) ⇒ String

    Permalink
  19. abstract class PathTo[A] extends AnyRef

    Permalink
  20. trait PolyIdentifiable[A <: Coproduct] extends Identifiable[A]

    Permalink
  21. sealed trait PolyToMany[A <: Coproduct] extends AnyRef

    Permalink
  22. sealed trait PolyToOne[A <: Coproduct] extends AnyRef

    Permalink
  23. sealed trait RelatedResponse[A] extends AnyRef

    Permalink

    Used render proper related link response as specified by jsonapi spec found at http://jsonapi.org/format/1.0/#fetching-resources

  24. trait ResourceType[A] extends AnyRef

    Permalink
  25. sealed trait ToMany[A] extends AnyRef

    Permalink

    Represents a relationship to zero or more objects of type A com.qvantel.jsonapi.ToMany.IdsReference case class is used to represent a ToMany relationship where the objects have not been loaded com.qvantel.jsonapi.ToMany.Loaded case class is used to represent a ToMany relationship where the objects have been loaded

    Represents a relationship to zero or more objects of type A com.qvantel.jsonapi.ToMany.IdsReference case class is used to represent a ToMany relationship where the objects have not been loaded com.qvantel.jsonapi.ToMany.Loaded case class is used to represent a ToMany relationship where the objects have been loaded

    A

    Type of the object the relationships point to

  26. sealed trait ToOne[A] extends AnyRef

    Permalink

    Represents a relationship to object A com.qvantel.jsonapi.ToOne.Reference case class is used when A is not loaded but we know it's id.

    Represents a relationship to object A com.qvantel.jsonapi.ToOne.Reference case class is used when A is not loaded but we know it's id. In case we do not know the id of the other end of the relationship wrap the relation in option and fill it with None com.qvantel.jsonapi.ToOne.Loaded case class is used when A is loaded

    A

    Type of the object the relationship points to

  27. final case class UntypedMeta(jsonBody: JsValue) extends Meta with Product with Serializable

    Permalink
  28. final macro class jsonApiResource extends Annotation with StaticAnnotation

    Permalink

    macro annotation used to generate JsonApiFormat and related things for a case class

    macro annotation used to generate JsonApiFormat and related things for a case class

    Annotations
    @compileTimeOnly( ... ) @compileTimeOnly( ... )

Value Members

  1. object ApiError extends Serializable

    Permalink
  2. object ApiRoot extends Serializable

    Permalink
  3. object HasId

    Permalink
  4. object Identifiable

    Permalink
  5. object Includes

    Permalink
  6. object JsonAbsent extends JsonOption[Nothing] with JsonEmpty with Product with Serializable

    Permalink

    This case object represents non-existent values.

  7. object JsonApiClient

    Permalink
  8. object JsonApiResourceMacro

    Permalink
  9. object JsonApiSorting

    Permalink
  10. object JsonNull extends JsonOption[Nothing] with JsonEmpty with Product with Serializable

    Permalink

    This case object represents null values.

  11. object JsonOption

    Permalink
  12. object Link

    Permalink
  13. object NameManglers

    Permalink
  14. implicit object PathJsonFormat extends JsonFormat[Uri]

    Permalink
  15. object PathTo

    Permalink
  16. object PolyIdentifiable

    Permalink
  17. object PolyToMany

    Permalink
  18. object PolyToOne

    Permalink
  19. object RelatedResponse

    Permalink
  20. object ResourceType

    Permalink
  21. object ToMany

    Permalink
  22. object ToOne

    Permalink
  23. implicit def coproductJsonApiWriter0[L](implicit wl: JsonApiWriter[L]): JsonApiWriter[:+:[L, CNil]]

    Permalink
  24. implicit def coproductJsonApiWriter1[L, R <: Coproduct](implicit wl: JsonApiWriter[L], wr: JsonApiWriter[R]): JsonApiWriter[:+:[L, R]]

    Permalink
  25. macro def includes[A]: Includes[A]

    Permalink
    Annotations
    @compileTimeOnly( ... )
  26. macro def jsonApiFormat[A]: JsonApiFormat[A]

    Permalink
    Annotations
    @compileTimeOnly( ... )
  27. macro def jsonApiWriter[A]: JsonApiFormat[A]

    Permalink
    Annotations
    @compileTimeOnly( ... )
  28. package macrosupport

    Permalink
  29. def rawCollection[T](entities: Iterable[T])(implicit writer: JsonApiWriter[T], metaProfiles: Set[MetaProfile] = Set.empty, sorting: JsonApiSorting = JsonApiSorting.Unsorted): JsObject

    Permalink
  30. def rawOne[T](entity: T)(implicit writer: JsonApiWriter[T], metaProfiles: Set[MetaProfile] = Set.empty, sorting: JsonApiSorting = JsonApiSorting.Unsorted): JsObject

    Permalink
  31. def readCollection[T](json: JsObject, includes: Set[String])(implicit reader: JsonApiReader[T]): Iterable[T]

    Permalink

    Reads a collection of jsonapi entities.

    Reads a collection of jsonapi entities. Due to include paths being provided includes will be handled.

  32. def readCollection[T](json: JsObject)(implicit reader: JsonApiReader[T]): Iterable[T]

    Permalink

    Reads a collection of jsonapi entities.

    Reads a collection of jsonapi entities. Due to no includes path being provided includes are ignored.

  33. def readOne[T](json: JsObject, includes: Set[String])(implicit reader: JsonApiReader[T]): T

    Permalink

    Reads one jsonapi entity.

    Reads one jsonapi entity. Due to include paths being provided includes will be handled.

  34. def readOne[T](json: JsObject)(implicit reader: JsonApiReader[T]): T

    Permalink

    Reads one jsonapi entity.

    Reads one jsonapi entity. Due to no includes path being provided includes are ignored.

  35. val uriConfig: UriConfig

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped