Questions tagged [objectmapper]

ObjectMapper is a library for simple JSON object mapping in Swift.

ObjectMapper is a library for simple JSON object mapping in Swift.

1145 questions
2
votes
1 answer

Default behaviour of ObjectMapper

I have a class object which I am converting to json using jackson ObjectMapper. After converting it makes double entries for each variable. Is this behaviour normal and if it is then can somebody explain that to me a bit? My current understanding is…
Napstablook
  • 594
  • 1
  • 6
  • 24
2
votes
1 answer

Add a secondary ObjectMapper in SpringBoot

I want to use the default ObjectMapper almost everywhere in my application. However, there is a specific request that I need to sent to a third party that requires different ObjectMapper. There are lots of posts on how to customize the default…
J_D
  • 3,526
  • 20
  • 31
2
votes
0 answers

How to serialise field with empty collection of object?

Here is my POJO: public class Target { @JsonProperty(value="sizes",required=true) private Set Sizes; @JsonProperty(value="domains",required=true) private Set Domains; // getters and setters } I initialize this…
Stan Marsh
  • 65
  • 12
2
votes
2 answers

How to append a array of dictionary using object mapper in swift 4?

After successfully logged in, I am getting this message in my console. Inside the user there is a array list named UserMedias. I want to append that UserMedias to a empty array list so that I can show the data of UserMedias in a table view. I am…
Gorib Developer
  • 587
  • 2
  • 13
  • 27
2
votes
0 answers

Jackson deserialize java.lang.Long generic type with default typing enabled fails

Jackson databind v2.9.4. Object mapper definition: ObjectMapper objectMapper = new ObjectMapper(); /* * Custom configuration */ objectMapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY); …
SRH LABS
  • 373
  • 1
  • 2
  • 15
2
votes
1 answer

objectmapper.readvalue automatically change the timezone

I am sending date from front end as below format as string. [{"StartDate":"2018-03-09"}] In spring i am using ObjectMapper to get this in POJO. While using ObjectMapper.readValue is converting to below date. Fri Mar 09 05:30:00 IST 2018 I…
2
votes
1 answer

Convert json response to Realm object

hi I am trying to convert json response from a web service to realm object and insert it into realm database using object mapper but returns objects with null values Alamofire.request(url).responseJSON { response in let products =…
Mohanraj
  • 587
  • 4
  • 21
2
votes
3 answers

Mapping a flat map to a nested pojo in jackson

How can I map a flat map to a nested pojo? I've tried using this, however I get an unrecognized field exception on the field sword. Map values = ...; ObjectMapper mapper = new…
user9062626
2
votes
0 answers

Unable to load JDK7 types in Android Studio

I have being coming up with solutions to make this post successful, unfortunately I ended here with these error I've been aching to fix. The error stated when I stated to implement ObjectMapper. W/Java7Support: Unable to load JDK7 types…
2
votes
2 answers

ObjectMapper parsing generic object

I got error when parsing generic object with ObjectMapper Here is my classes: class BaseResponse: NSObject, Mappable { var isSuccess: Bool! var data: T? required init?(map: Map) { super.init() self.mapping(map: map) …
lee5783
  • 434
  • 4
  • 12
2
votes
2 answers

FullAuditedEntity, ObjectMapper: CreatorUserId Null when Creating New Entry or Deleting

I have been posting data to a Full Audited Entity via the API. As it is FullAuditedEntity, it should automatically be created with creatorId, creationTime and a couple other column values. But when I checked in the database, CreatorUserID is null…
2
votes
0 answers

AWS - DynamoDB - CRUD methods doesn't work correctly

I really need Your help, I'm trying to create simple kitchen management application. I decided to use AWS with DynamoDB, I stucked with CRUD methods: add and delete methods seems to work fine, but I have big problems with editing database…
D.Zet
  • 753
  • 3
  • 11
  • 32
2
votes
1 answer

Jackson serialize and deserialize objects without double quotes

I want to serialize and deserialize objects like java Date or UUID to and from String. The problem is that it surrounds the String itself with double quotes: String s = objectMapper.writeValueAsString(date); System.out.println("String: @@" + s +…
Archie
  • 962
  • 2
  • 9
  • 20
2
votes
1 answer

register modules in object mapper globally

i have Topic class having a data member duration of type LocalTime @Entity @Table(name= "topics") @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id", scope = Long.class) …
dhyanandra singh
  • 1,071
  • 2
  • 18
  • 38
2
votes
1 answer

AlamofireObjectMapper Generic parameter 'T' could not be inferred

i'm trying to have a system where all my api requests path through one function and map them to the corresponding object func sendApi(url : String , httpMethod : HTTPMethod = .get, parameters: Parameters? = nil, …
Tarek hemdan
  • 874
  • 2
  • 10
  • 24