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. final case class ApiRoot(apiRoot: Option[Uri]) extends Product with Serializable

    Permalink
  2. trait HasId extends AnyRef

    Permalink
  3. trait Identifiable[A] extends AnyRef

    Permalink
  4. trait Includes[+A] extends AnyRef

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

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

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

    Permalink
    Annotations
    @compileTimeOnly( ... )
  8. 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

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

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

    Permalink
  11. 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

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

    Permalink

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

  13. 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( ... )
  14. trait Meta extends AnyRef

    Permalink
  15. trait MetaProfile extends AnyRef

    Permalink
  16. type NameMangler = (String) ⇒ String

    Permalink
  17. abstract class PathTo[A] extends AnyRef

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

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

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

    Permalink
  21. 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

  22. trait ResourceType[A] extends AnyRef

    Permalink
  23. 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

  24. 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

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

    Permalink
  26. 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 ApiRoot extends Serializable

    Permalink
  2. object HasId

    Permalink
  3. object Identifiable

    Permalink
  4. object Includes

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

    Permalink

    This case object represents non-existent values.

  6. object JsonApiResourceMacro

    Permalink
  7. object JsonApiSorting

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

    Permalink

    This case object represents null values.

  9. object JsonOption

    Permalink
  10. object Link

    Permalink
  11. object NameManglers

    Permalink
  12. implicit object PathJsonFormat extends JsonFormat[Uri]

    Permalink
  13. object PathTo

    Permalink
  14. object PolyIdentifiable

    Permalink
  15. object PolyToMany

    Permalink
  16. object PolyToOne

    Permalink
  17. object RelatedResponse

    Permalink
  18. object ResourceType

    Permalink
  19. object ToMany

    Permalink
  20. object ToOne

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

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

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

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

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

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

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

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

    Permalink
  29. 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.

  30. 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.

  31. 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.

  32. 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.

  33. val uriConfig: UriConfig

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped