예제 #1
0
 @Override
 public MapConvertor marshal(Map<String, Object> map) throws Exception {
   MapConvertor convertor = new MapConvertor();
   for (Map.Entry<String, Object> entry : map.entrySet()) {
     MapConvertor.MapEntry e = new MapConvertor.MapEntry(entry);
     convertor.addEntry(e);
   }
   return convertor;
 }
예제 #2
0
 @Override
 public Map<String, Object> unmarshal(MapConvertor map) throws Exception {
   Map<String, Object> result = new HashMap<String, Object>();
   for (MapConvertor.MapEntry e : map.getEntries()) {
     result.put(e.getKey(), e.getValue());
   }
   return result;
 }