[jackson-annotations] 168/207: Implement #31
Timo Aaltonen
tjaalton at moszumanska.debian.org
Sat Sep 6 13:55:51 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 d7e541cc13cd8b781a24bb400953b84f364c03a9
Author: Tatu Saloranta <tatu.saloranta at iki.fi>
Date: Fri Mar 14 21:21:02 2014 -0700
Implement #31
---
release-notes/VERSION | 4 +++-
.../java/com/fasterxml/jackson/annotation/JsonPropertyOrder.java | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/release-notes/VERSION b/release-notes/VERSION
index 4f12b3a..2dc7700 100644
--- a/release-notes/VERSION
+++ b/release-notes/VERSION
@@ -1,9 +1,11 @@
Project: jackson-annotations
-Version: 2.4 (xx-xxx-2013)
+Version: 2.4.0 (xx-xxx-2013)
NOTE: version number changed to NOT include patch version, as no patch
releases are planned for annotations set.
+#31: Allow use of `@JsonPropertyOrder` for properties (not just classes)
+
------------------------------------------------------------------------
=== History: ===
------------------------------------------------------------------------
diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonPropertyOrder.java b/src/main/java/com/fasterxml/jackson/annotation/JsonPropertyOrder.java
index 861b798..541cb0f 100644
--- a/src/main/java/com/fasterxml/jackson/annotation/JsonPropertyOrder.java
+++ b/src/main/java/com/fasterxml/jackson/annotation/JsonPropertyOrder.java
@@ -25,8 +25,12 @@ import java.lang.annotation.Target;
* This annotation may or may not have effect on deserialization: for basic JSON
* handling there is no effect, but for other supported data types (or structural
* conventions) there may be.
+ *<p>
+ * NOTE: annotation is allowed for properties, starting with 2.4, mostly to support
+ * alphabetic ordering of {@link java.util.Map} entries.
*/
- at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE})
+ at Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE,
+ ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotation
public @interface JsonPropertyOrder
--
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