XStream different alias for same class (Map.class) for different fields
问题 I am using XStream to convert a Java class which has fields of the type java.util.Map. I have a converter for java.util.Map which displays the key of the Map as an xml element and the value of the map as the value for the xml element. I have registered the converter using registerConverter method. When I perform the marshalling, I get the following output. <cart account_id="123" shift_id="456" account_postings_id="641"> <supervisor_id>555</supervisor_id> <payments> <map sequence="1"> <amount