[jackson-annotations] 182/207: Revert addition of #33; need to revisit for 2.5, but can't be implemented in time for 2.4

Timo Aaltonen tjaalton at moszumanska.debian.org
Sat Sep 6 13:55:53 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 e03da33740a7301e7ec7e0d0721d2e0b2a103196
Author: Tatu Saloranta <tatu.saloranta at iki.fi>
Date:   Wed May 7 22:28:44 2014 -0700

    Revert addition of #33; need to revisit for 2.5, but can't be implemented in time for 2.4
---
 release-notes/VERSION                              |  1 -
 .../fasterxml/jackson/annotation/JsonRootName.java | 27 ++++++++++++++--------
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/release-notes/VERSION b/release-notes/VERSION
index 0717df8..9545e18 100644
--- a/release-notes/VERSION
+++ b/release-notes/VERSION
@@ -6,7 +6,6 @@ NOTE: Annotations module will never contain changes in patch versions,
 
 #31: Allow use of `@JsonPropertyOrder` for properties (not just classes)
 #32: Add `@JsonProperty.index`
-#33: Add `@JsonRootName.alwaysWrap`
 - Add `JsonFormat.Value#timeZoneAsString` (needed by Joda module)
 - Add `@JsonRootName.namespace` to allow specifying of namespace with
   standard Jackson annotations (not just XML-specific ones that dataformat-xml
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonRootName.java b/src/main/java/com/fasterxml/jackson/annotation/JsonRootName.java
index b282de7..6889ec3 100644
--- a/src/main/java/com/fasterxml/jackson/annotation/JsonRootName.java
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonRootName.java
@@ -11,6 +11,10 @@ import java.lang.annotation.Target;
  * enabled. Annotation itself does not indicate that wrapping should
  * be used; but if it is, name used for serialization should be name
  * specified here, and deserializer will expect the name as well.
+ *<p>
+ * As of 2.4, one missing feature is property "alwaysWrap", which is hoped
+ * to be added in 2.5, and would be used to force root name wrapping
+ * for individual types.
  */
 @Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
 @Retention(RetentionPolicy.RUNTIME)
@@ -18,12 +22,23 @@ import java.lang.annotation.Target;
 public @interface JsonRootName
 {
     /**
-     * Root name to use if root-level wrapping is enabled.
+     * Root name to use if root-level wrapping is enabled. For data formats
+     * that use composite names (XML), this is the "local part" of the name
+     * to use.
      */
     public String value();
 
     /**
-     * Optioanl marker property that can be defined as <code>true</code> to force
+     * Optional namespace to use with data formats that support such
+     * concept (specifically XML); if so, used with {@link #value} to
+     * construct fully-qualified name.
+     *
+     * @since 2.4
+     */
+    public String namespace() default "";
+    
+    /*
+     * Optional marker property that can be defined as <code>true</code> to force
      * wrapping of root element, regardless of whether globally
      * "root wrapping" is enabled or not.
      *<p>
@@ -31,14 +46,6 @@ public @interface JsonRootName
      * and will not block use of wrapper if use is indicated by global features.
      *
      * @since 2.4
-     */
     public boolean alwaysWrap() default false;
-    
-    /**
-     * Optional namespace to use with data formats that support such
-     * concept (specifically XML).
-     *
-     * @since 2.4
      */
-    public String namespace() default "";
 }

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