Re: [jackson-user] JSON Response Has Escaped Quotations Using Jackson and JAX-RS Exception Mapper

2019-05-21 Thread Tatu Saloranta
On Tue, May 21, 2019 at 7:23 PM Uzh Valin wrote: > > Thanks Tatu, but how do I read it back when I send this as part exception > JSON body? It seems like when if read the body with > HttpStatusCodeException.getResponseBodyAsString(), it contains all sort of > JsonNode data rather than the actua

Re: [jackson-user] JSON Response Has Escaped Quotations Using Jackson and JAX-RS Exception Mapper

2019-05-21 Thread Uzh Valin
Thanks Tatu, but how do I read it back when I send this as part *exception *JSON body? It seems like when if read the body with HttpStatusCodeException.getResponseBodyAsString(), it contains all sort of JsonNode data rather than the actual data that I send back from the Rest producer. On Tue

Re: [jackson-user] JSON Response Has Escaped Quotations Using Jackson and JAX-RS Exception Mapper

2019-05-21 Thread Tatu Saloranta
On Tue, May 21, 2019 at 3:57 PM Uzh Valin wrote: > > Ok, but how does Jackson know which custom mapper to call if we are simply > putting obj.getFirstProperty() in the response map? I know need one value and > would want the serializer to ignore all other properties regardless whether > they ha

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

Re: [jackson-user] JSON Response Has Escaped Quotations Using Jackson and JAX-RS Exception Mapper

2019-05-21 Thread Uzh Valin
Ok, but how does Jackson know which custom mapper to call if we are simply putting obj.getFirstProperty() in the response map? I know need one value and would want the serializer to ignore all other properties regardless whether they have been initialized with default values. On Tuesday, May 2

Re: [jackson-user] @JsonIgnore not working in Mix-in when field has @JsonFormat

2019-05-21 Thread Tatu Saloranta
On Thu, May 16, 2019 at 8:12 PM cofe wrote: > > public class GeneralUser { > private String name; > private String password; > @JsonFormat( > pattern = "-MM-dd HH:mm:SS" > ) > private Date createTime; > @JsonFormat( > pattern = "-MM-dd HH:mm:SS" >

Re: [jackson-user] Re: Jackson 2.9.9 patch release available

2019-05-21 Thread Tatu Saloranta
On Tue, May 21, 2019 at 3:48 PM Алексей Рединский wrote: > > If we are not using JDK11 module system, is Jackson 2.9.9 JDK11 compatible? > In a sense of byte code, not using sun internal classes, not using removed > API and so on. Yes, it should be similarly compatible as previous 2.9.x version

Re: [jackson-user] com.fasterxml.jackson.core:jackson-databind + JDK11

2019-05-21 Thread Tatu Saloranta
On Tue, May 21, 2019 at 3:48 PM Алексей Рединский wrote: > > Hello guys, > > we are in the process of migrating from JDK8 to JDK11 and our internal tool > says that the library is not JDK11 compatible because it uses some of the > removed API's and/or classes. Are there any plans to make it JDK1

[jackson-user] com.fasterxml.jackson.core:jackson-databind + JDK11

2019-05-21 Thread Алексей Рединский
Hello guys, we are in the process of migrating from JDK8 to JDK11 and our internal tool says that the library is not JDK11 compatible because it uses some of the removed API's and/or classes. Are there any plans to make it JDK11 compatible? -- You received this message because you are subscri

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

[jackson-user] Re: Jackson 2.9.9 patch release available

2019-05-21 Thread Алексей Рединский
If we are not using JDK11 module system, is Jackson 2.9.9 JDK11 compatible? In a sense of byte code, not using sun internal classes, not using removed API and so on. On Thursday, May 16, 2019 at 3:51:23 PM UTC-7, Tatu Saloranta wrote: > > So, Jackson 2.9.9 is now out (with jackson-module-scala 2

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] Re: NPE with JsonIdentityReference and serializer modifier

2019-05-21 Thread undefined
Thank you for your response. However, are you sure you are referencing the problem described above ? If you actually are referencing to the post, I don't understand you

Re: [jackson-user] Re: NPE with JsonIdentityReference and serializer modifier

2019-05-21 Thread Tatu Saloranta
On Tue, May 21, 2019 at 11:20 AM undefined wrote: > Hello from the future ! > > I've ran into this issue but I don't understand what you guys meant by > "Delegating to the default serializer" ? > That would refer to your custom serializer keeping a reference to the "default serializer", one tha

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] JSON Response Has Escaped Quotations Using Jackson and JAX-RS Exception Mapper

2019-05-21 Thread Tatu Saloranta
Just one question: > responseBody.put("firstProperty", > serializeFirstProperty(obj.getFirstProperty())); > responseBody.put("secondProperty", > serializeSecondProperty(obj.getSecondProperty())); > responseBody.put("thirdProperty", > serializeThirdProperty(obj.getThirdPro

Re: [jackson-user] Re: NPE with JsonIdentityReference and serializer modifier

2019-05-21 Thread undefined
Hello from the future ! I've ran into this issue but I don't understand what you guys meant by "Delegating to the default serializer" ? Thanks in advance, Yohan -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group

[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] Re: NPE with JsonIdentityReference and serializer modifier

2019-05-21 Thread undefined
Hey guys, I am having a very similar problem. I have read your discussion on the thread, and I dont understand what you mean by "Delegating to the default serializer" ? I have overriden `createContextual` and `resolve` methods in my serializer, but this doesn't seem to work as easily. Can you p

[jackson-user] JSON Response Has Escaped Quotations Using Jackson and JAX-RS Exception Mapper

2019-05-21 Thread Uzh Valin
I have a simple requirement where, if application encounters an exception, my JAX-RS Rest endpoint should return a custom JSON response with 500 HTTP header status. Data needed to construct the response comes from an object with several properties (see below). The problem is, I am only interest