FormRepresentationDecoder decoder = FormEncodingFactory.getDecoder();
URL url = asURL("/menuItems.json");
String json = readURL(url);
retval = decoder.decodeMenuItemsMap(json);
} catch (FormEncodingException e) {
throw new MenuServiceException("Problem parsing menu items json file", e);
} catch (URISyntaxException e) {
throw new MenuServiceException("Problem finding menu items json file", e);
} catch (FileNotFoundException e) {
throw new MenuServiceException("No menu items json file found", e);
} catch (IOException e) {
throw new MenuServiceException("Problem reading menu items json file", e);
} catch (Exception e) {
throw new MenuServiceException("Unexpected error", e);
}
return retval;
}