On Tue, May 21, 2019 at 3:48 PM Tamás Cservenák <
ta...@cservenak.net> wrote:
>
> If kotlin, and hence vert-x kotlin integration, I don't think jackson-module-kotlin is involved at all...
Interesting -- I would not recommend use of Kotlin values without the
module but if it works (minus this issue) I guess that's nice.
But as to the problem, as per SO question, it is not actually that
`field` is renamed but combination of field implying "isSuccess" --
but not being visible to be auto-detected -- and getter implying
"success". So field is effectively ignored.
As answer suggests there are couple of ways of dealing with this;
renaming is one way, but changing introspection visibility could also
work (without needing annotations) by re-configuring two things:
1. Making all fields (including `private`) visible
2. Blocking introspection of "is-getters"
Auto-detection is covered f.ex at:
https://www.logicbig.com/tutorials/misc/jackson/json-auto-detect.html
https://www.baeldung.com/jackson-field-serializable-deserializable-or-not
but note that there are 2 different ways to change it:
1. Per-class using `@JsonAutoDetect`
2. Globally, as defaults, via `ObjectMapper.setVisibility()`
-+ Tatu +-