Questions tagged [jackson2]

Use this tag only for questions specifically related to version 2 of the Jackson library

Jackson version 2 is a Java serialization and deserialization API typically used for reading and writing JSON, although other data formats such as Avro, CBOR, CSV, Java Properties, Protobuf, Smile, XML, and YAML are also supported.

464 questions
0
votes
1 answer

WELD-001408: Unsatisfied dependencies for type ObjectMapper with qualifiers @Default at

I try to inject an ObjectMapper using fasterXML jackson like this: @Inject private ObjectMapper objectMapper; but i have the next error when i try to deploy the war file: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied…
Carlos Laspina
  • 2,013
  • 4
  • 27
  • 44
0
votes
0 answers

Jackson ObjectMapper - XML in JSON values

I have some JSON provided by a system out of my control that includes XML in some of the JSON values (in unpredictable locations). Example: { "glossary": { "title": "example glossary", "extras": "
tmgstevens
  • 114
  • 1
  • 7
0
votes
2 answers

Spring - Hibernate Jackson mapping

i have two entites building a Many-To-Many relationship, on the one side Category.java: @ManyToMany() @JoinTable( name = "categories_articles", joinColumns = @JoinColumn(name = "categoryID", referencedColumnName = "id"), …
Creative crypter
  • 1,348
  • 6
  • 30
  • 67
0
votes
4 answers

Json parsing using jackson or Gson

How to parse same json object keys to 2 different model classes using jackson or Gson? This is input json { "last_sync_dt": "1486711867749", "meetings_info": [ { "date": "2017-01-15", "meeting_id": "1", …
Meonix
  • 33
  • 6
0
votes
1 answer

JAX-RS: serializing a POJO fails on payara micro

After moving our application war from Glassfish3 to a deployment with Payara Micro, the JAX-RS serialization (jersey + jackson) doesn't work any more. Thanks to Adam, we solved the issue with serializing pure collections, we now encounter similar…
Matthias Simon
  • 388
  • 5
  • 13
0
votes
2 answers

Jackson - serialization of Map implementation

I have following class: public class Some implements Map{ private Map innerMap; //implementation that can only set innerMap in constructor and cannot add or remove values } The problem is that I cannot…
Bojan Vukasovic
  • 2,054
  • 22
  • 43
0
votes
2 answers

Remove the automatically display of getter in POJO

Below I have given my POJO structure and the current out put and expected output. My requirement is, when I am printing the JSON format the variable called "applicationUsage " automatically included in my output JSON as key, But I dont want to add…
Souvik
  • 1,219
  • 3
  • 16
  • 38
0
votes
1 answer

Passing Java Object to a RESTful service

I'm passing a Java object to a Web service that accepts json, using HttpURLConnection. Employing com.fasterxml.jackson to convert the object to json string and then writing it to the output stream, the service works fine for simple dummy POJOs, but…
RESTless
  • 1
  • 1
0
votes
1 answer

Working with Jackson Converter in Android

I have a json response look like this "pen": [ { "company": "Lexi", "ink": "red", "instock": true }, { "company":…
Kiran Benny Joseph
  • 6,755
  • 4
  • 38
  • 57
0
votes
1 answer

Is there a Jackson 2 equivalent to Jackson 1's StdSerializerProvider?

I have inherited some legacy code that uses Jackson 1.9.2 and am wanting to upgrade it to Jackson 2.x. One point of contention is the following: class CustomObjectMapper extends ObjectMapper { CustomObjectMapper(KeySerializer keySerializer) { …
Thunderforge
  • 19,637
  • 18
  • 83
  • 130
0
votes
2 answers

Jersey 2.x ExceptionMapper Parent Mapping

EDIT: It was an issue in earlier versions of ackson-jaxrs-base ,which is resolved in jackson-jaxrs-base-2.8. https://github.com/FasterXML/jackson-jaxrs-providers/issues/22 I am struggling with this issue, with exception mapper. I want to map all…
0
votes
1 answer

Is it reasonable to assume that all children of root node in Jackson are field names?

I am trying to iterate through JsonNode tree, and I have written a following snippet that iterate over children nodes of root node and gets the text out of it, which I assume will be a field name. JsonNode rootNode = new…
THIS USER NEEDS HELP
  • 3,136
  • 4
  • 30
  • 55
0
votes
0 answers

Mapping JSON data to Java POJO Class with Jackson Mapper, want to get result in listview

Trying to parse using jackson through intent data and adding to pojo class and getting back but not able to send and fetch ? MainActivity is.. public class MainActivity extends AppCompatActivity { private Button getButton; private TextView…
Parveen Sharma
  • 103
  • 1
  • 10
0
votes
1 answer

Polymorphic deserialization Jackson issue

Java : /** */ @JsonTypeInfo(include=As.PROPERTY, property="_type", use=Id.NAME) @JsonSubTypes({ @JsonSubTypes.Type(value=Dog.class, name="dog"), @JsonSubTypes.Type(value=Cat.class, name="cat"), }) @ResourceName("animal"); public…
Suresh
  • 13
  • 6
-1
votes
1 answer

Java/Jackson JSON serialisation: How to write Map to Array of objects?

I have a POJO in my Java project which has a field with datatype Map: @Data @NoArgsConstructor public class B { private Map dummyField; } Currently, while serializing the JSON using the Jackson the field has been…
BATMAN_2008
  • 2,788
  • 3
  • 31
  • 98
1 2 3
30
31