All Questions
8,879
questions
0
votes
0
answers
18
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....
-1
votes
1
answer
39
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 ...
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 ...
1
vote
1
answer
88
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 ...
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",
...
0
votes
2
answers
65
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": &...
1
vote
0
answers
69
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 ...
0
votes
1
answer
50
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-...
0
votes
1
answer
42
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 ...
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 ...
0
votes
1
answer
42
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 ...
0
votes
0
answers
57
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"))
...
1
vote
0
answers
48
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 ...
1
vote
2
answers
66
views
Json array map position to java property with jackson
Is there a way in Jackson to map json array's positions to different class properties?
For example if we have an api that returns person properties as array (0 is the id, 1 is the name,2 is the age, ...
-1
votes
1
answer
69
views
Json annotations used in Java mostly
I have data received from DB in JSON format, but I have to align all the fields in a proper position like below:
{
"Name":"Maveric",
"Age":"26",
"Add":...