[jackson-user] Why jackson renames my object properties?

2019-05-21 Thread Ahmed Kamal
I have a data class like the following data class User(val id: String, val name: String, val isVerified: Boolean) When I'm trying to serialize it using io.vertx.core.json.Json.encode(user), "which is uses Jackson underneath" I expect the result

Re: [jackson-user] Why jackson renames my object properties?

2019-05-21 Thread Tatu Saloranta
That does not look like Java. Is it Kotlin? If so, I think there are a few issues filed: https://github.com/FasterXML/jackson-module-kotlin/issues that talk about this problem. Fundamentally I think this stems from the fact that Java Bean convention considers boolean isSomeProperty() to im

Re: [jackson-user] Why jackson renames my object properties?

2019-05-21 Thread Tamás Cservenák
Google is your friend: https://stackoverflow.com/questions/32270422/jackson-renames-primitive-boolean-field-by-removing-is But vert.x "wraps" Jackson, unsure are you able to configure or even reach Mapper to apply these changes. HTH, T On Tue, May 21, 2019 at 8:21 PM Ahmed Kamal wrote: > I hav

Re: [jackson-user] Why jackson renames my object properties?

2019-05-21 Thread Tamás Cservenák
If kotlin, and hence vert-x kotlin integration, I don't think jackson-module-kotlin is involved at all... As I see sources: https://github.com/vert-x3/vertx-lang-kotlin/blob/master/vertx-lang-kotlin/src/main/java/io/vertx/kotlin/core/json/json.kt And it seems to me that vertx-lang-kotlin uses JSO

Re: [jackson-user] Why jackson renames my object properties?

2019-05-21 Thread Tatu Saloranta
On Tue, May 21, 2019 at 3:48 PM Tamás Cservenák 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 ni