My web service returns data in both xml and json using Spring MVC. For json, spring uses Jackson and XStream for XML. However, XStream uses fields for serialization while Jackson uses methods (setter/getter).My web service returns data in both xml and jso