问题
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?
回答1:
I have been using this , a mapper for pojos
https://github.com/txusballesteros/android-transformer
回答2:
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'
来源:https://stackoverflow.com/questions/30784031/a-object-to-object-mapper-compatible-on-android