Question

When i read the documentation of robospice I don't understand in which case I have to choose to create a new custom service or using an exising (pre-set) one.

Do you have concreat exemples ?

ps: I'll be using jackson to retieve JSON data for numerous POJOs classes.

Thanks

Était-ce utile?

La solution

In your case, if you need just to retrieve JSON data, you can use JacksonSpringAndroidSpiceService. If in the future you will need to add support for other stuff (i.e adding a new MessageConverter) you can just subclass it and add whatever you need.

A case where you would have to create your own custom SpiceService is the need to perform both JSON and XML requests. In this case, for example, you will need to create your custom service and add message converters and object persisters for both JSON and XML.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top