Questions tagged [fasterxml]

FasterXML is an open source XML and JSON parsing for the Java platform

489 questions
10
votes
3 answers

Map an array of JSON objects to a java.util.Map and vice versa

The question is how to map an array of JSON objects to a java.util.Map where each key would be some specified property of an object and the value is the object itself. JSON: {"items": [{"field1": 1, "field2": "Hello"}, {"field1": 2,…
Pavel Mitrofanov
  • 303
  • 1
  • 4
  • 12
10
votes
2 answers

How can I loosen up the naming strategy when deserializing using Jackson?

I've been trying to upgrade the JSON modules to use the FasterXML (2.6.3) versions of Jackson instead of the old Codehaus modules. During the upgrade, I've noticed that the naming strategy differs when using FasterXML instead of Codehaus. Codehaus…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
9
votes
1 answer

jackson fasterxml add namespaces to root element

If I have the class A.java: @JacksonXmlRootElement(localName = "A") public class A { } The output that gets produced is: I want to add a few more namespaces to the output, i.e.…
Hooli
  • 1,135
  • 3
  • 19
  • 46
9
votes
1 answer

Issues finding com.fasterxml.jackson.core in IntelliJ Idea

I pulled down an 2 years old project and I'm having trouble building the project. I'm getting the following errors: Error:(57, 29) java: cannot access com.fasterxml.jackson.core.Versioned class file for com.fasterxml.jackson.core.Versioned not…
D25
  • 159
  • 1
  • 1
  • 4
9
votes
2 answers

Is there an valid proguard rule for RxJava and FasterXML?

Now the only problem stopping me from using kotlin in production is that I can't find a correct proguard file for it. What I used: 1.Kotlin 2.Anko 3.Jackson-Kotlin-module Here's the warning message: :app:proguardRelease Warning:…
Marvin
  • 1,726
  • 1
  • 17
  • 25
9
votes
1 answer

Deserialization of map with integer keys using Jackson

I have to serialize a simple integer-to-string map as JSON and then read it back. The serialization is pretty simple, however since JSON keys must be strings the resulting JSON looks like: { "123" : "hello", "456" : "bye", } When I read it…
AlexR
  • 114,158
  • 16
  • 130
  • 208
8
votes
1 answer

Java 8 Exception: com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer has no default (no arg) constructor

I have a model class that has a field: @JsonDeserialize(using = InstantDeserializer.class) @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSZ") private OffsetDateTime offsetDt; When a request of this model is sent to the server, my controller…
jlp
  • 1,656
  • 6
  • 33
  • 48
8
votes
2 answers

Convert String to Integer using FasterXML Jackson

I'm consuming two JSONs. The first one has the ID as a String. "details": { "id": "316.0" } The other one has the ID as Integer. "details": { "detailId": 316 } Both JSONs are being mapped with FasterXML to two different classes. I want…
Lucas Beier
  • 621
  • 1
  • 7
  • 19
8
votes
4 answers

Json (fasterxml) stackoverflow exception

When trying to serialize a Category I get a stackoverflow. Exception Warning: StandardWrapperValve[dispatcher]: Servlet.service() for servlet dispatcher threw exception java.lang.StackOverflowError at …
Svexo
  • 523
  • 1
  • 4
  • 15
8
votes
1 answer

What is the replacement class for SerializerBase in FasterXML Jackson 2?

I am upgrading to Jackson 2. I have many custom serializers extending SerializerBase (org.codehaus.jackson.map.ser.std.SerializerBase). What's the new equivalent class in Jackson 2
mohamed.ibrahim
  • 413
  • 3
  • 8
7
votes
1 answer

Jackson databind : Cannot construct instance of `java.time.OffsetDateTime`

I am moving my project from dropwizard to mirconuat and I am getting below exception while consuming webservice response. i tried upgrading jackson version but it failed with warning and below cause. Caused by:…
2787184
  • 3,749
  • 10
  • 47
  • 81
7
votes
1 answer

Cannot deserialize instance of `java.lang.String` out of START_OBJECT token

I am getting the below error message, can someone please help or suggest how best to debug this. Cannot deserialize instance of java.lang.String out of START_OBJECT token at [Source: (PushbackInputStream); line: 1, column: 37610] (through…
robbie70
  • 1,515
  • 4
  • 21
  • 30
7
votes
2 answers

Deserializing XML with list using Jackson

I have the following XML that I'd like to deserialize to Java POJO.
Damien-Amen
  • 7,232
  • 12
  • 46
  • 75
7
votes
1 answer

Change JsonProperty (Access.WRITE_ONLY) programmatically

My Java objects have some fields that are annotated write only because they should not be send over a REST interface to the users. @JsonProperty(access = Access.WRITE_ONLY) private List integerList; Now I am trying to implement an…
Codehai
  • 524
  • 1
  • 7
  • 27
7
votes
2 answers

Redisson and Json for objects

I currently trying out Redisson as a Redis client and so far I've been able to replace a good chunk of code with no issues. The only problem I'm having now is trying to use the distributed collections, such as Queue or List. List entries =…
KingTravisG
  • 1,316
  • 4
  • 21
  • 43
1
2
3
32 33