aboutsummaryrefslogtreecommitdiff
path: root/shared/src/main/scala/annotations.scala
diff options
context:
space:
mode:
authorJakob Odersky <jakob@driver.xyz>2018-06-29 17:56:06 -0700
committerJakob Odersky <jakob@odersky.com>2018-07-02 16:30:35 -0700
commitdf09f6ed64aad3e83f98e13a3d7d9b3a82ccd0a8 (patch)
tree5eeae70f4ecc7293ddcc8e17a74e86945745510d /shared/src/main/scala/annotations.scala
parentc5c1aa6bc78b6ebc346befe9f4b434401a683a59 (diff)
downloadspray-json-derivation-df09f6ed64aad3e83f98e13a3d7d9b3a82ccd0a8.tar.gz
spray-json-derivation-df09f6ed64aad3e83f98e13a3d7d9b3a82ccd0a8.tar.bz2
spray-json-derivation-df09f6ed64aad3e83f98e13a3d7d9b3a82ccd0a8.zip
Change GADT to ADT
Diffstat (limited to 'shared/src/main/scala/annotations.scala')
-rw-r--r--shared/src/main/scala/annotations.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/shared/src/main/scala/annotations.scala b/shared/src/main/scala/annotations.scala
index 1b7c62c..4437aeb 100644
--- a/shared/src/main/scala/annotations.scala
+++ b/shared/src/main/scala/annotations.scala
@@ -2,11 +2,11 @@ package spray.json
import scala.annotation.StaticAnnotation
-/** An annotation that designates that a sealed trait is a generalized algebraic
- * datatype (GADT), and that a field containing the serialized childrens' types
- * should be added to the final JSON objects.
+/** An annotation that designates that a sealed trait is an algebraic datatype
+ * (ADT), and that a field containing the serialized childrens' types should be
+ * added to the final JSON objects.
*
- * Note that by default all sealed traits are treated as GADTs, with a type
+ * Note that by default all sealed traits are treated as ADTs, with a type
* field called `type`. This annotation enables overriding the name of that
* field and is really only useful if a child itself has a field called `type`
* that would otherwise result in a conflict.
@@ -14,9 +14,9 @@ import scala.annotation.StaticAnnotation
* Example:
* {{{
* // the JSON field "kind" will contain the actual type of the serialized child
- * @gadt("kind") sealed abstract class Keyword(`type`: String)
+ * @adt("kind") sealed abstract class Keyword(`type`: String)
* case class If(`type`: String) extends Keyword(`type`)
* }}}
* @param typeFieldName the name of the field to inject into a serialized JSON
* object */
-final class gadt(val typeFieldName: String = "type") extends StaticAnnotation
+final class adt(val typeFieldName: String = "type") extends StaticAnnotation