Questions tagged [object-object-mapping]

129 questions
3
votes
1 answer

Can not deserialize instance of Object out of START_ARRAY token

I have two object one is Dashboard and second is Room i have a json which is look like this { "hotel_id":"1", "hotel_room":"200", "hotel_properties":[{ "id":"1", "room_type":"Single", "rack_rate":"2000", …
3
votes
2 answers

Is it good practice to use object-object mappers, and, if so, where to use it?

I've googled some around the internet and found some articles about the subject, but none of them satisfied me. I want to know is it good to use object-object mapper to map objects to each other? I know it depends on situation to use, but how will I…
3
votes
3 answers
3
votes
1 answer

Mapping to complex objects with restkit

I am trying to map a complex json object to my objects my json contains a property that is a true or false value: object { rootProp2 = 1; <== fails to get mapped (this is a BOOL object) } to object result: (null), (null),(null),(null) with object…
Lena Bru
  • 13,521
  • 11
  • 61
  • 126
3
votes
0 answers

Jackson ObjectMapper: specify required fields

When deserializing from json, is there an easy way for ObjectMapper to throw an exception when a required field is missing from json?
Shuo
  • 4,749
  • 9
  • 45
  • 63
3
votes
3 answers

What is the objective of an ObjectMapper?

I don't understand why in Object Oriented development people are using some ObjectMapper class. Could you explain me what is the purpose of this kind of class? I'm also looking for documentation about it. I found a lot of information explaining how…
Bastien Vandamme
  • 17,659
  • 30
  • 118
  • 200
3
votes
1 answer

c# ValueInjecter : Mapping the whole object Graph

I just started using ValueInjecter for my Entity Mappings(DTO <-> Entity). Heres my DTO : public class IncidentDTO { int ID { get; set; } string Name { get; set; } AgencyDTO agencyDTO { get; set; } } public class AgencyDTO { int ID…
Prateek Singh
  • 863
  • 1
  • 8
  • 28
2
votes
0 answers

ORM Like Framework for Semantic Data?

Is there an graph to object mapping framework for handling RDF? I would like to get some recommendations and any personal experiences. Background Details: I have an application that has been using Oracle, because of the dynamic nature of the data,…
uncaught_exceptions
  • 21,712
  • 4
  • 41
  • 48
2
votes
2 answers

Dozer mapping non-Generic Collections to properties

I have some class structure as follows. These classes are hibernate classes so I cant change them. //assume all getters & setters are present public class Order{ private Customer customer; } public class Customer{ // non generics set …
user918953
  • 173
  • 1
  • 2
  • 9
2
votes
1 answer

MapStruct - Nested mapping

I need to map a response from third party API to another response structure. I'm using Mapstruct for that. ThirdParty API classes : public class TPResponse { protected UserListsType userLists; protected ProductOffers offers; //getters…
Futuregeek
  • 1,900
  • 3
  • 26
  • 51
2
votes
2 answers

Mapstruct case insensitive mapping

is there a way in mapstruct to ignore the case of the fields when mapping. let say i want to map following two classes public class Customer { private String ID; public String getID() { return ID; } public void…
user3817206
  • 315
  • 4
  • 14
2
votes
0 answers

Dozer mapping : one source to multiple destinations

I am a novice to Dozer and I just learnt to map one source object to destination using Dozer. I have to convert the source to destinations based on condition. But how can I map one field from source as another field into multiple destinations? is…
Extreme
  • 2,919
  • 1
  • 17
  • 27
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
1 answer

Using MapStruct SPI custom AccessorNamingStrategy with Gradle

I am trying to implement a custom accessor naming strategy like documented here: http://mapstruct.org/documentation/stable/reference/html/#using-spi However, I can't get it to work with Gradle. There only seems to be a usage example for…
chris
  • 2,541
  • 1
  • 23
  • 40
2
votes
0 answers

AutoMapper + ProjectTo - Mapping to entity class with navigation property

My database: public class Product { public int Id { get; set;} public ICollection FieldValues { get; set;} // other properties } public class FieldValue { public int Id { get; set; } public int FieldId { get; set; } …
1 2
3
8 9