a object to object mapper compatible on Android

5.2k views Asked by At

I'm looking for an object to object mapper for Android. It's all about an automation of Java Bean to Java Bean copy so that each field with a name xyz will match a field xyz in another class. I've tried already each of those in Java http://www.javacodegeeks.com/2013/10/java-object-to-object-mapper.html

But none is Android compilable, do you have any ideas what to try?

2

There are 2 answers

1
rahul.ramanujam On BEST ANSWER

I have been using this , a mapper for pojos

https://github.com/txusballesteros/android-transformer

0
Vito Valov On

I used http://modelmapper.org in some projects. Quite flexible. See the getting-started for more info. Just add this in your build.gradle:

compile 'org.modelmapper:modelmapper:0.7.4'