diff --git a/src/main/java/com/fasterxml/jackson/annotation/JsonProperty.java b/src/main/java/com/fasterxml/jackson/annotation/JsonProperty.java index 7097da25..cb19492c 100644 --- a/src/main/java/com/fasterxml/jackson/annotation/JsonProperty.java +++ b/src/main/java/com/fasterxml/jackson/annotation/JsonProperty.java @@ -24,8 +24,9 @@ * Java fields in a single declaration like: *
* public class POJO {
- * \@JsonProperty("a")
- * public int a, b, c;
+ * {@literal @JsonProperty}("a")
+ * public int a, b, c;
+ * }
*
* since it would associate same annotation for all fields, leading to name
* collision.
@@ -33,11 +34,11 @@
* Starting with Jackson 2.6 this annotation may also be
* used to change serialization of {@code Enum} like so:
*
-public enum MyEnum {
- {@literal @JsonProperty}("theFirstValue") THE_FIRST_VALUE,
- {@literal @JsonProperty}("another_value") ANOTHER_VALUE;
-}
-
+ * public enum MyEnum {
+ * {@literal @JsonProperty}("theFirstValue") THE_FIRST_VALUE,
+ * {@literal @JsonProperty}("another_value") ANOTHER_VALUE;
+ * }
+ *
* as an alternative to using {@link JsonValue} annotation.
*- * NOTE: if a exclusion marker like {@link JsonIgnore} is also present, + * NOTE: if an exclusion marker like {@link JsonIgnore} is also present, * property accessor is excluded; ignoral has higher precedence over inclusion. */ @Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})