Skip to content
Advertisement

Tag: fasterxml

FasterXml – JsonSerializer HashMap

I’m using jackson-databind version 2.12.3 to serialize the return of an object that should return like this: My classes are these: The return is myObject: However with the default ObjectMapper the “link.setField” is ignored and the returned json is: I tried doing some tests with JsonSerializer but couldn’t do something generic for all classes that extend HashMap (these classes are

@JsonProperty not working after springboot upgrade

I recently upgraded my application from Spring Boot 1.5.3 to Spring Boot 2.3.5. One of the feature on UI started breaking and I found while debugging that the json response to UI had changed Original response: New response: having underscores (_) in attribute names It seems that the @JsonProperty is not working. My classes are as below: I tried @JsonCreator(mode

Java: FasterXML / jackson deserialize array without keys

Is there a way how to deserialize JSON array into following Java class using FasterXML jackson-databind? I only found answers where there are key: value items in the array. Answer Firstly {[“a”, “b”, 1]} is not a Valid Json Array (or JSON) …. JSON Array would look like this [“a”, “b”, 1] Also you could deserialize the Json Array into

Advertisement