[jackson-annotations] 06/207: Javadoc improvement
Timo Aaltonen
tjaalton at moszumanska.debian.org
Sat Sep 6 13:55:33 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 cf49a9fea292af97c5a121e3ea3817ba90ae9531
Author: Tatu Saloranta <tsaloranta at gmail.com>
Date: Wed Jan 11 20:42:55 2012 -0800
Javadoc improvement
---
src/main/java/com/fasterxml/jackson/annotation/JsonValue.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonValue.java b/src/main/java/com/fasterxml/jackson/annotation/JsonValue.java
index 9277082..82c6964 100644
--- a/src/main/java/com/fasterxml/jackson/annotation/JsonValue.java
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonValue.java
@@ -24,10 +24,17 @@ import java.lang.annotation.Target;
* and applications should not rely on specific behavior.
*<p>
* A typical use case is that of annotating <code>toString()</code>
- * method so that returned String value is Object's Json serialization.
+ * method so that returned String value is Object's JSON serialization.
*<p>
* Boolean argument is only used so that sub-classes can "disable"
* annotation if necessary.
+ *<p>
+ * NOTE: when use for Java <code>enum</code>s, one additional feature is
+ * that value returned by annotated method is also considered to be the
+ * value to deserialize from, not just JSON String to serialize as.
+ * This is possible since set of Enum values is constant and it is possible
+ * to define mapping, but can not be done in general for POJO types; as such,
+ * this is not used for POJO deserialization.
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
--
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