Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
1 vote
2 answers
35 views

Jackson Deserialization - Treat specific string values as being null

I am working with an external API and have generated the Java client classes using the OpenAPI generator. One of the fields defined in the response is marked as being of a date type as shown below and ...
Leon's user avatar
  • 538
-2 votes
0 answers
21 views

Retrieve a specific value from JSON array using jackson [duplicate]

I'm trying to retrieve an specific attribute from a JSON that I got from an API response directly into a java object using jackson, but when I print it returns null. The attribute in question is "...
Phillipe Wolff's user avatar
0 votes
0 answers
20 views

S3 Sink Confluent Kafka Connector JsonParser feature

I have json data in kafka, getting below stack trace at org.apache.kafka.connect.json.JsonConverter.toConnectData(JsonConverter.java:331) ... 18 more Caused by: com.fasterxml.jackson.core....
gaurav miglani's user avatar
-1 votes
1 answer
40 views

Jackson INDENT_OUTPUT doesn't format properly - what am I doing wrong?

I've been trying to figure this out for a bit but couldn't pin-point my mistake. I have a JSON I'd like to read into Java objects, manipulate those objects, then write them to a new JSON. Code looks ...
anon's user avatar
  • 31
1 vote
1 answer
51 views

How to parse a matrix of interface objects using JSON?

I have an Item interface that is used to create and store game items. These items are stored in the player's inventory in the form of a matrix (IItem[][] inventory). When trying to implement the read ...
Dodly Game's user avatar
1 vote
1 answer
89 views

Jackson deserialize generic class with field T as POJO or String array

I have the following class public class Customer<T>{ private String name; private String store; private T details; } public class Details{ private String dob; private ...
greatFritz's user avatar
0 votes
1 answer
74 views

Read JSON array as enums with type based on property

My JSON input is this: { // other fields "context": [ { "id": "age", "name": "Age", "type": "string", ...
EarthTurtle's user avatar
0 votes
2 answers
66 views

Convert array to a hashmap during Jackson mapping, with each entry key being the entrie's id field

This is the JSON I'm working on: { "default": "ignore-me", "catalog": [ { "id": "object-1", "name": &...
bobbyrne01's user avatar
  • 6,573
1 vote
0 answers
71 views

Can't use getter-names that do not follow JavaBean naming conventions

I am trying to learn the Jackson library for parsing JSON in Java, and I am becoming more and more frustrated. It does not seem like this library will recognize any getters and setters that do not ...
gocode_'s user avatar
  • 19
0 votes
1 answer
53 views

Problem unmarshalling a json array in spring boot

I'm trying to unmarshall the json array from https://pokeapi.co/api/v2/pokemon/25/encounters, here it's the resume version: [ { "location_area": { "name": "sinnoh-...
Yerri's user avatar
  • 1
0 votes
1 answer
43 views

JAXRS / Jackson polymorphic payload deserialization

I have a JAX-RS POST method handler, where I expect the payload JSON to be deserialized to a Java POJO class which is an implementation of an interface. The exact implementation of the interface to ...
Rahul's user avatar
  • 189
2 votes
1 answer
53 views

Jackson's JsonSerializer don't work for deep-nested object hirarchies

For the serialization of Java object instances I use the Jackson Library and have built several JsonSerializers, which should individually check Player.class, Vehicle.class and Building.class and ...
Jonas's user avatar
  • 45
0 votes
1 answer
44 views

Customize Jackson serialization/deserialization of child attribute from parent

I have a generic record that I use to send enum values with a description to my front-end: public record EnumJson<E extends Enum<E>>(E value, String description) { } I have a single ...
Werner de Groot's user avatar
0 votes
0 answers
59 views

Java-json-jackson: How to set JsonDeserialize without access to the (abstract) class?

After learning and searching from many examples about deserialization and handling with a property "type" often used, (@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")) ...
JörgH's user avatar
  • 1
1 vote
0 answers
49 views

Solve conflicting getter definitions for property in Jackson

I have the following class: import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import lombok.Getter; import lombok.Setter; import ...
Lizzie's user avatar
  • 351

15 30 50 per page
1
2 3 4 5
592