Skip to content
Advertisement

Tag: jackson

SpringMVC, why ‘@RequestBody String body’ stops working after adding MappingJackson2HttpMessageConverter

need some help with jackson2 and springMvc. Issue: when adding MappingJackson2HttpMessageConverter jsons fail to parse (previously they did parse) with error below. I have following @Controller method in code: And it have been working just fine until I’ve decided to add MappingJackson2HttpMessageConverter() into converters. Like this: but after I do so, my requests stop to work with the following error

Jackson deserialization to concrete polymorphic class

I have following Jackson annotated classes (Kotlin) I try to deserialize JSON that does not contain type property but I provide concrete class so it should not matter I get Missing type id when trying to resolve subtype of … anyway. Is there a way how to tell Jackson to use the type provided in the deserialization and not to

Stack overflow error for hibernate one-to-one mapping with Spring Data JPA

My problem is similar to this one https://discourse.hibernate.org/t/hibernate-throws-org-hibernate-id-identifiergenerationexception-attempted-to-assign-id-from-null-one-to-one-property/1777 but I am getting a different exception after applying the answer from this thread. My entities: Controller with corresponding Spring Data Repository: With this payload: I am getting an endless nested response with proper fields(distributor -> location -> distributor -> location ..), which ends with SO Error: I can’t fathom why does

Parse array JSON Schema with Jackson

I have a JSON Schema defined : It’ll always be a schema which contains firstly items and then it’ll contain properties. In properties can be more arrays or objects found so I want to do that recursively. What i’m trying to achieve is a Map<String, Object> which directly represents the schema. Where I’m getting stuck is the recursive call where

Advertisement