-
Maybe I'm missing something here but I'm trying to have a class that both ignores setters for some elements and ignores getters for others. Since JsonIgnoreProperties only allows you to specify one of these and isn't repeatable am I write that there is no real way to specify this with annotations? |
Beta Was this translation helpful? Give feedback.
Answered by
eamonno
Jul 3, 2025
Replies: 1 comment
-
Oh, nevermind, typically after an hour trying to find a solution I find one after posting. You can just use the JsonProperty(access = JsonProperty.Access.READ_ONLY) or WRITE_ONL?Y annotations on individual properties. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
pjfanning
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh, nevermind, typically after an hour trying to find a solution I find one after posting. You can just use the JsonProperty(access = JsonProperty.Access.READ_ONLY) or WRITE_ONL?Y annotations on individual properties.