[jackson-annotations] 136/207: Implement #15

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 723a55cdbeab23e310df5160bce02b559bea5277
Author: Tatu Saloranta <tatu.saloranta at iki.fi>
Date:   Tue Jul 23 23:11:16 2013 -0700

    Implement #15
---
 release-notes/VERSION                                    |  3 +++
 .../com/fasterxml/jackson/annotation/JsonTypeInfo.java   | 16 ++++++++++++++--
 2 files changed, 17 insertions(+), 2 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 ce05b9b..9d33c77 100644
--- a/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonTypeInfo.java
@@ -160,7 +160,7 @@ public @interface JsonTypeInfo
          * as JSON Object.
          */
         WRAPPER_ARRAY,
-        
+
         /**
          * Inclusion mechanism similar to <code>PROPERTY</code>, except that
          * property is included one-level higher in hierarchy, i.e. as sibling
@@ -169,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