Class MapAdapter

  • public class MapAdapter
    extends javax.xml.bind.annotation.adapters.XmlAdapter<Map,​Map<String,​Object>>
    Map is serialized by default as a list of entries. This is fine for XML but not that nice for JSON when the map keys are strings. We would like the Map to be serialized as a list of entries when the output format is XML and as a JSON object when the output format is JSON. This adapter allows us to use Map in the REST resource that retrieves the class property values, while the XML serialization will be done using the schema-generated Map.
    $Id: d4ef57738bda11fda37a72a50d1fa6bb1bfa269c $