code: @Override
      public JsonNode getJsonNode(PortletPreferences prefs, String key) throws IOException {
          final String prefValue = StringUtils.trimToNull(prefs.getValue(key, null));
          if (prefValue == null) {
              // Default to an empty object
              return mapper.createObjectNode();
          }
          return mapper.readTree(prefValue);
      }
docs: Read the specified portlet preference and parse it as a JSON string into a {@link JsonNode}
  If the preference is null returns a {@link JSONObject}.
  
  @param prefs Preferences to read from
  @param key Preference key to read from