code: private Object exctractJsonifiedValue(ObjectToJsonConverter pConverter, Object pValue, Stack<String> pPathParts)
              throws AttributeNotFoundException {
          if (pValue.getClass().isPrimitive() || FINAL_CLASSES.contains(pValue.getClass()) || pValue instanceof JSONAware) {
              // No further diving, use these directly
              return pValue;
          } else {
              // For the rest we build up a JSON map with the attributes as keys and the value are
              List<String> attributes = extractBeanAttributes(pValue);
              if (attributes.size() > 0) {
                  return extractBeanValues(pConverter, pValue, pPathParts, attributes);
              } else {
                  // No further attributes, return string representation
                  return pValue.toString();
              }
          }
      }
docs: =====================================================================================================