code: public static JSONObject getWidgetConfigurationAsJSON(String widgetConfiguration) {
  
          JSONObject result = new JSONObject();
          if (CmsStringUtil.isEmptyOrWhitespaceOnly(widgetConfiguration)) {
              return result;
          }
          Map<String, String> confEntries = CmsStringUtil.splitAsMap(
              widgetConfiguration,
              CONF_PARAM_SEPARATOR,
              CONF_KEYVALUE_SEPARATOR);
          for (Map.Entry<String, String> entry : confEntries.entrySet()) {
              try {
                  result.put(entry.getKey(), entry.getValue());
              } catch (JSONException e) {
                  // should never happen
                  LOG.error(
                      Messages.get().container(Messages.ERR_XMLCONTENT_UNKNOWN_ELEM_PATH_SCHEMA_1, widgetConfiguration),
                      e);
              }
          }
          return result;
      }
docs: Returns the widget configuration string parsed into a JSONObject.<p>
  
  The configuration string should be a map of key value pairs separated by ':' and '|': KEY_1:VALUE_1|KEY_2:VALUE_2 ...
  
  @param widgetConfiguration the configuration to parse
  
  @return the configuration JSON