class JsonUtil {

  private static Map<String, byte[]> toXAttrMap(final Object[] objects) 
      throws IOException {
    if (objects == null) {
      return null;
    } else if (objects.length == 0) {
      return Maps.newHashMap();
    } else {
      final Map<String, byte[]> xAttrs = Maps.newHashMap();
      for(int i = 0; i < objects.length; i++) {
        Map<?, ?> m = (Map<?, ?>) objects[i];
        String name = (String) m.get("name");
        String value = (String) m.get("value");
        xAttrs.put(name, decodeXAttrValue(value));
      }
      return xAttrs;
    }
  }

}