class JsonConverter implements Converter {

    @Override
    public String convert(final String json, final String rootName) {
        String xml;
        try {
            JSONObject jsonObject = new JSONObject(json);
            xml = buildXMLFrom(XML.toString(jsonObject), rootName);
        } catch (JSONException e) {
            logger.debug("Couldn't convert to XML the following JSON: " + json, e);
            xml = "";
        }
        return xml;
    }

}