[jackson-annotations] 08/207: Add properties for @JsonUnwrapped
Timo Aaltonen
tjaalton at moszumanska.debian.org
Sat Sep 6 13:55:34 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 b91693bac3266e8615abfe138f0661a75b033d43
Author: Tatu Saloranta <tsaloranta at gmail.com>
Date: Fri Jan 13 21:58:45 2012 -0800
Add properties for @JsonUnwrapped
---
.../fasterxml/jackson/annotation/JsonUnwrapped.java | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonUnwrapped.java b/src/main/java/com/fasterxml/jackson/annotation/JsonUnwrapped.java
index 57e983a..73bf88e 100644
--- a/src/main/java/com/fasterxml/jackson/annotation/JsonUnwrapped.java
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonUnwrapped.java
@@ -51,7 +51,8 @@ import java.lang.annotation.Target;
*<p>
* Also note that annotation only applies if
*<ul>
- * <li>Value is serialized as JSON Object
+ * <li>Value is serialized as JSON Object (can not unwrap JSON arrays using this
+ * mechanism)
* </li>
* <li>Serialization is done using <code>BeanSerializer</code>, not a custom serializer
* </li>
@@ -59,8 +60,6 @@ import java.lang.annotation.Target;
* not be altered regardless of inclusion strategy; so annotation is basically ignored.
* </li>
* </ul>
- *
- * @since 1.9
*/
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@@ -73,4 +72,18 @@ public @interface JsonUnwrapped
* value need not be explicitly included.
*/
boolean enabled() default true;
+
+ /**
+ * Optional property that can be used to add prefix String to use in front
+ * of names of properties that are unwrapped: this can be done for example to prevent
+ * name collisions.
+ */
+ String prefix() default "";
+
+ /**
+ * Optional property that can be used to add suffix String to append at the end
+ * of names of properties that are unwrapped: this can be done for example to prevent
+ * name collisions.
+ */
+ String suffix() 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