Questions tagged as 'jackson'

1
answer

How to extract JSON Array into an object's List attribute of an object

I'm using the Flickr API to get the information from the images, which returns the following JSON:   per page ": 100," total ":" 5964 "," photo ": [" id ":" 21577339501 "," owner ":" 85277110 @ N02 "," secret ":" 31e850dfeb "," server ":" 578...
asked by 12.10.2015 / 01:32
0
answers

ERROR: null value in column "id_municipio_id_municipio" violates the non-null constraint [closed]

This error is occurring when I try to persist the screen data to the bank. I checked, by debugging the screen, that the data is being fetched. When the method exits line 33 of the image it goes straight to line 45. Theserverloglookslikethis:...
asked by 28.09.2017 / 22:38
1
answer

How to choose which serialize field - Jackson

I'm using Jackson to convert my objects to Json . The fields I do not want to serialize markup with @JsonIgnore annotation, but in some cases I wanted to serialize those fields. Is there any way to choose when to serialize them?     
asked by 04.04.2016 / 16:11
1
answer

Configuring the Jackson Library for Dynamic Attributes

I'm using the Jackson library to transform the following JSON into a Java object. {"name":"Agent/MetricsReported/count","begin":"2014-02-04T09:44:00Z","end":"2014-02-04T09:45:00Z","app":"","agent_id":, "average_exclusive_time":0.23999999463558...
asked by 04.02.2014 / 13:10
1
answer

Jackson - Converting Objects with Circular Dependency

Given the classes below, we need to solve the problem of infinite recursion (cyclic dependency), and for this we use @JsonIdentityInfo, from Jackson 2 +: @JsonIdentityInfo(scope=Parent.class, generator=ObjectIdGenerators.PropertyGenerator.clas...
asked by 15.04.2015 / 22:05
1
answer

How not to serialize some attributes in RESTful calls with Jersey and Jackson

I'm using the Jersey library in conjunction with the Jackson library to use REST-type web services. In calls, I usually use the following code that transforms a given entity into a JSON to be sent in the request body. Map<String, Object>...
asked by 31.01.2014 / 17:49
1
answer

Spring / Jackson Json - Problem in deserialize

This question is a follow-up to another question, a user answered found the solution to my other question ( Spring Custom Json Receive ), but I'm now having trouble mapping using Jackson. I want to receive a custom request in JSON and send a...
asked by 01.07.2016 / 22:09
2
answers

Json created incomplete

Next staff was experiencing a loop problem in my project when creating the Json application looping. I was able to solve the loop problem with the annotation @JsonManagedReference, @JsonBackReference. But an Incomplete Json is being created:...
asked by 26.09.2017 / 23:56
0
answers

Android Jackson Post

A Doubt: I'm trying to make a post, but the jackson library during the Post does not change the field name during serialization, how do I do this with Jackson? My class below: @JsonIdentityReference public class Envio { @JsonSerialize...
asked by 11.09.2015 / 17:27
0
answers

JsonBackReference and JsonManagedReference, bidirectional between two classes

I have the following DTOs public class UserDTO { private String name; @JsonManagedReference("phone") private UserPhoneDTO phone; } public class PhoneDTO { private String number; @JsonManagedReference("user") priva...
asked by 05.06.2015 / 20:39