Skip to main content
0 votes
0 answers
4 views

how to make Jackson SimpleBeanPropertyFilter filterOutAllExcept work for nested objects

how can I keep all the nested objects with the same property names? for example. Top level class is Policy. @JsonFilter("myFilter") public class Policy { String name; String number; ...
Sidharth Mittal's user avatar
-1 votes
0 answers
30 views

Jackson Polymorphism problem, can an interface be a subtype of another interface, in the given structure?

Below is the structure I would ideally have for my json files and concrete classes. I cant get it to work though, and the alternatives would be less elegant. It fails at test 3, with this error: com....
Dreijnde's user avatar
-1 votes
0 answers
10 views

Joda DateTime serialization fails

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Joda date/time type org.joda.time.DateTime not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-...
dinuka udan's user avatar
0 votes
0 answers
13 views

NoSuchFieldError for Jackson map DeserializationConfig$Feature.WRAP_ROOT_VALUE

I have an application that has been in use for 5+ years. I did not write the app, but recently took over maintenance of it. It has an ObjectMapper that is of type org.codehaus.map.ObjectMapper. The ...
Ron Bromwell's user avatar
0 votes
2 answers
77 views

How to serialize a date to a specific format? [closed]

The mandatory output format of any date in a JSON string is: { "element": [ "~#date", [ "2013-05-31" ] ], ... } I have to ...
tm1701's user avatar
  • 7,475
-2 votes
0 answers
57 views

json to java pojo deserialization [closed]

I have JSON which I have to convert into a Java POJO. Here is the JSON: { "foreclosurePreferences": [ { "...
Subhendu Mahanta's user avatar
-2 votes
0 answers
26 views

How to parse incomplete/partial JSON in Java? [closed]

I’m working on a project where I receive partial JSON data in a stream, and I need to handle the gradual construction of the JSON object as the stream progresses. For instance, the JSON data starts in ...
Mr.LiuDC's user avatar
  • 103
1 vote
1 answer
41 views

Jackson serialization for a specific static object

I am trying to serialize a list which contains objects I cannot manipulate. That list contains a reference to a static object: final public static Object NULL_VALUE = new Object() { public String ...
alturkovic's user avatar
  • 1,110
0 votes
1 answer
24 views

@JsonRootName not working with @RequestBody

enter image description here I promise input json strings are same,but The Dto's Field around @RequestBody always null; version JDK8,17 springboot2.0,3.3 jackson 2.11,2.14 input strings { "user&...
K凯布利斯's user avatar
0 votes
0 answers
51 views

Inconsistent Serialization with Jackson’s @JsonUnwrapped Annotation Using Shared vs. New ObjectMapper Instances

I am using Jackson version 2.16.1 and have encountered a peculiar behavior. According to the API documentation, it is recommended to use a common ObjectMapper instance. However, I observe different ...
Sandeep Gaur's user avatar
1 vote
0 answers
20 views

RESTEASY000100: Failed executing POST: org.jboss.resteasy.spi.ReaderException: java.io.IOException: Stream closed

Getting intermittent errors on Jboss 5 for POST requests, most requests go through only some run into error. 2024-09-10 11:46:15,389 ERROR [org.jboss.resteasy.core.SynchronousDispatcher] ...
Nivid's user avatar
  • 11
0 votes
2 answers
100 views

Spring controller won't deserialize instant

I'm having trouble integrating Spring with Jackson. I have a POJO which has some Instant fields with a custom date format: public class C{ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = &...
Rafael Lima's user avatar
  • 3,464
0 votes
0 answers
26 views

Jackson deserialize XML to list of abstract item based on NodeTagName

I want to deserialize an XML with jackson. I have an xml string like this: "<items><RulesActivity/><StartActivity/><RulesActivity/></items>" This is my ...
Unicorn365's user avatar
-3 votes
1 answer
36 views

The issue is with mapping objects to the model during deserialization [closed]

colleagues! I've encountered an issue with object mapping during deserialization. We have an interface Source, which is implemented by two classes (SimpleSource and ComplexSource). Instances of these ...
Vsevolod Rostovskiy's user avatar
0 votes
1 answer
32 views

Spring boot Jackson deserialization error. Invoking un-needed foreign fields

I'm trying to make a post method that accepts a 'food' item and saves it. The food entity has two foreign fields called "restaurant" and "menu". When I send the request, for some ...
Thuta's user avatar
  • 3

15 30 50 per page
1
2 3 4 5
1114