[jackson-annotations] 138/207: Revert "Revert #15, since it may not actually be needed"
Timo Aaltonen
tjaalton at moszumanska.debian.org
Sat Sep 6 13:55:48 UTC 2014
This is an automated email from the git hooks/post-receive script.
tjaalton pushed a commit to branch master
in repository jackson-annotations.
commit a431cebc46157859507ba5e52d50f2ab60c5c8f6
Author: Tatu Saloranta <tatu.saloranta at iki.fi>
Date: Wed Jul 24 22:45:05 2013 -0700
Revert "Revert #15, since it may not actually be needed"
This reverts commit 6d39751edce7e55b1ecb3da0a420e1b4f185cf24.
---
release-notes/VERSION | 3 +++
.../fasterxml/jackson/annotation/JsonTypeInfo.java | 25 ++++++++++++++--------
2 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/release-notes/VERSION b/release-notes/VERSION
index 9d2fa70..4a839f2 100644
--- a/release-notes/VERSION
+++ b/release-notes/VERSION
@@ -3,6 +3,9 @@ Version: 2.3.0 (xx-xxx-2013)
New minor version
+#15: Add `JsonTypeInfo.As.EXISTING` property to support new variation
+ for including Type Id.
+
------------------------------------------------------------------------
=== History: ===
------------------------------------------------------------------------
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java b/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java
index 94b786c..9d33c77 100644
--- a/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java
@@ -45,14 +45,9 @@ import java.lang.annotation.*;
* (and set via setter or field) on deserialization.
*<p>
* On serialization side, Jackson will generate type id by itself,
- * except if there is a property annotated with {@link JsonTypeId}:
- * if such explicit id is defined, it will be used instead.
- * Note that simple matching of {@link #property()} and name of
- * a visible POJO property does NOT establish a link.
- *
- * @see JsonTypeId
- * @see JsonSubTypes
- * @see JsonTypeName
+ * except if there is a property with name that matches
+ * {@link #property()}, in which case value of that property is
+ * used instead.
*/
@Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE,
ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@@ -174,7 +169,19 @@ public @interface JsonTypeInfo
* for types (classes). Trying to use it for classes will result in
* inclusion strategy of basic <code>PROPERTY</code> instead.
*/
- EXTERNAL_PROPERTY
+ EXTERNAL_PROPERTY,
+
+ /**
+ * Inclusion mechanism similar to <code>PROPERTY</code> with respect
+ * to deserialization; but one that is produced by a "regular" accessible
+ * property during serialization. This means that <code>TypeSerializer</code>
+ * will do nothing, and expect a property with defined name to be output
+ * using some other mechanism (like default POJO property serialization, or
+ * custom serializer).
+ *
+ * @since 2.3.0
+ */
+ EXISTING_PROPERTY
;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jackson-annotations.git
More information about the pkg-java-commits
mailing list