Jackson CSV - Boolean type support

As per the documentation, jackson-dataformat-csv only supports "true", "false", "null", or empty string values. Is there a way to configure it to support other values as well (like "Yes", "No", "TRUE", "FALSE", etc)? ...
more »

2017-03-19 21:03 (0) Answers

Jackson is returning duplicate rows

I am trying to return json from these two entity classes. Questions.java @Entity public class Questions { @Id @Column(name = "id") private int id; @Column(name = "question") private String question; @Column(name = "type") private String type; ...
more »

2017-03-19 19:03 (2) Answers

deserialize Json into POJO

I am trying to convert the following JSON structure (part of a larger JSON object) to a POJO but getting the exception copied below (using Java/Jackson). JSON "outputKeys": {"ABC":"gGyIioUr4Jfr5QiCm6Z==", "DEF":"RxHfNyD2JyPOpG5tv3Jaj5g=="} Java...
more »

2017-03-17 21:03 (2) Answers

how to convert name=value pairs to Json

I need to call third party API and consume the response as JSON object, but they return name=value pair format even though they claim that's JSON format: {body={user={first_name="foo",last_name="bar"}} is there any library that can convert the abo...
more »

2017-03-17 17:03 (2) Answers

Jackson doesn't parse underscore fields

Call is successfully from below webservice although fields where JSON name contain underscore are omitted...being shown as null. ShopifyProduct shopifyProducts = target.path( "admin" ).path( "products").queryParam("view","json").request( MediaType.A...
more »

2017-03-16 15:03 (0) Answers

how to access JsonPropertyOrder

I have a POJO with JsonPropertyOrder defined, in other class I need to retrieve that order for that POJO, how can I do do this? Example POJO: @JsonPropertyOrder({"field1", "field2", "field3"}) public class ReportRow extends Row { private String ...
more »

2017-03-16 06:03 (2) Answers

Jackson Unwrap / Wrap Object

I have a spring boot project and I have a class like this: @Value public class A { @JsonUnwrapped OrderKey key; String description; B b; @Value public static class B { String description; } } @Value public class OrderKey { @Js...
more »

2017-03-14 15:03 (2) Answers

Dynamically Generate Jackson JSON properties

How would I go about dynamically generating JsonProperty("task_b") and JsonProperty("task_a") using the tasks list provided? Basically this will continue to grow and I want to have them be generated programmatically because I need to know specific in...
more »

2017-03-13 22:03 (0) Answers

Migration Glassfish 3 to Glassfish 4 Jersey Error

I have a problem with an application migration from gf3 to gf4. I did the environment setup and I receive the following error stack when I try to deploy the app: org.glassfish.deployment.common.DeploymentException: CDI deployment failure:Type com.su...
more »

2017-03-13 16:03 (0) Answers

Jackson 2 pojo Get all json properties

I have a json data. With jackson 2 pojo I can create the reflected java class. But now I want to get all the properties and nested object properties from auto created java model class. This is my json to pojo approach public static void parseJson() ...
more »

2017-03-11 21:03 (0) Answers

Deserialize Scala deserialized object in Java

======Update===== For Scala class with Jackson annotation can be serialized in Java. case class B @JsonCreator()(@JsonProperty("test")test: Boolean) This works (takes care of the earlier problem). However if i use Option[Boolean].. case class B...
more »

2017-03-11 20:03 (0) Answers