code: public static Map<String, Object> toHierarchicalMap(final Props props) {
      final Map<String, Object> propsMap = new HashMap<>();
      propsMap.put("source", props.getSource());
      propsMap.put("props", toStringMap(props, true));
  
      if (props.getParent() != null) {
        propsMap.put("parent", toHierarchicalMap(props.getParent()));
      }
  
      return propsMap;
    }
docs: Convert a Props object to a hierarchical Map
  
  @param props props object
  @return a hierarchical Map presented Props object