docs: @SuppressWarnings("unchecked")
      private static void parseProperties(JSONObject modelJSON,
                                          Shape current,
                                          Boolean keepGlossaryLink) throws JSONException {
          if (modelJSON.has("properties")) {
              JSONObject propsObject = modelJSON.getJSONObject("properties");
              Iterator<String> keys = propsObject.keys();
              Pattern pattern = Pattern.compile(jsonPattern);
  
              while (keys.hasNext()) {
                  StringBuilder result = new StringBuilder();
                  int lastIndex = 0;
                  String key = keys.next();
                  String value = propsObject.getString(key);
  
                  if (!keepGlossaryLink) {
                      Matcher matcher = pattern.matcher(value);
                      while (matcher.find()) {
                          String id = matcher.group(1);
                          current.addGlossaryIds(id);
                          String text = matcher.group(2);
                          result.append(text);
                          lastIndex = matcher.end();
                      }
                      result.append(value.substring(lastIndex));
                      value = result.toString();
                  }
  
                  current.putProperty(key,
                                      value);
              }
          }
      }