From 5052c3625c41bff1d4d5a8761172db2d9608f911 Mon Sep 17 00:00:00 2001 From: Sergey <1583284+asmgf@users.noreply.github.com> Date: Mon, 13 Jul 2026 22:46:02 +0800 Subject: [PATCH] chore: JsonProperty javadoc * Fix escaping of @ in code example * Unify indent * Fix closing bracket * Fix typo --- .../jackson/annotation/JsonProperty.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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})