Is there any chance to get a easy way to sync data, in this case contacts, between the android contentprovider and a JSON-based server?
My problem is, that android uses the cursors and stuff and on the other side I have the JSON-Format. Second problem: the same value have now two different names, so I need a kind of mapping between values in the two different data sources.
My first approach was to define a "User"-Class. Where I would have different methods to fill it with data and different methods to get the data back. The problem is, that with this approach I have to do the mapping between android contentprovider and JSON server in every single method, e.g.
AndroidContact->(Mapping)->User-Object->(Mapping)->JSON-Format
JSON-Format->(Mapping)->-User-Object->(Mapping)->AndroidContact
As you can see, for the whole communication I need to do the mapping at least four times, which is really a pain in the ass, because I'm syncing ALL informations a contact can have, which is quite much.
So I'm searching for a clever way to sync my android contacts with an JSON server, without defining the whole mapping stuff more than once.
Hopefully I could make it clear, what I'm searching for. If not feel free to ask.
Cheers L0rdAli3n