[jackson-annotations] 78/207: Improve javadocs wrt currently supported @JsonFormat#shape values.

Timo Aaltonen tjaalton at moszumanska.debian.org
Sat Sep 6 13:55:41 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 2dd74e947337c0dad58ca0cf8447814105eb30f0
Author: Tatu Saloranta <tsaloranta at gmail.com>
Date:   Fri Aug 3 18:28:53 2012 -0700

    Improve javadocs wrt currently supported @JsonFormat#shape values.
---
 .../java/com/fasterxml/jackson/annotation/JsonFormat.java   | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonFormat.java b/src/main/java/com/fasterxml/jackson/annotation/JsonFormat.java
index bcd49ea..0efce6c 100644
--- a/src/main/java/com/fasterxml/jackson/annotation/JsonFormat.java
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonFormat.java
@@ -20,7 +20,7 @@ import java.util.TimeZone;
  * or String (such as ISO-8601 compatible time value) -- as well as configuring
  * exact details with {@link #pattern} property.
  *<p>
- * As of Jackson 2.0, known special handling include:
+ * As of Jackson 2.1, known special handling include:
  *<ul>
  * <li>{@link java.util.Date}: Shape can  be {@link Shape#STRING} or {@link Shape#NUMBER};
  *    pattern may contain {@link java.text.SimpleDateFormat}-compatible pattern definition.
@@ -31,6 +31,17 @@ import java.util.TimeZone;
  * <li>Can now be used on Classes (types) as well, for modified default behavior, possibly
  *   overridden by per-property annotation
  *   </li>
+ * <li>{@link java.lang.Enum}s: Shapes {@link Shape#STRING} and {@link Shape#NUMBER} can be
+ *    used to change between numeric (index) and textual (name or <code>toString()</code>);
+ *    but it is also possible to use {@link Shape#OBJECT} to serialize (but not deserialize)
+ *    {@link java.lang.Enum}s as JSON Objects (as if they were POJOs). NOTE: serialization
+ *     as JSON Object only works with class annotation; 
+ *    will not work as per-property annotation.
+ *   </li>
+ * <li>{@link java.util.Collection}s can be serialized as (and deserialized from) JSON Objects,
+ *    if {@link Shape#OBJECT} is used. NOTE: can ONLY be used as class annotation;
+ *    will not work as per-property annotation.
+ *   </li>
  *</ul>
  * 
  * @since 2.0

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