static ParsedViewDetail convert(JSONObject node) throws JSONException {
      final int left = node.getInt(BaseViewAttributePlugin.KEY_LEFT);
      final int top = node.getInt(BaseViewAttributePlugin.KEY_TOP);
      ParsedViewDetail detail =
          new ParsedViewDetail(
              node.getString(BaseViewAttributePlugin.KEY_CLASS),
              new Rect(
                  left,
                  top,
                  left + node.getInt(BaseViewAttributePlugin.KEY_WIDTH),
                  top + node.getInt(BaseViewAttributePlugin.KEY_HEIGHT)));

      JSONArray children = node.optJSONArray(BaseViewHierarchyPlugin.KEY_CHILDREN);
      if (children == null) {
        return detail;
      }

      for (int i = 0; i < children.length(); ++i) {
        detail.children.add(convert(children.getJSONObject(i)));
      }

      return detail;
    }
Utility class to make inspecting a serialized hierarchy easier
core/src/androidTest/java/com/facebook/testing/screenshot/layouthierarchy/LayoutHierarchyDumperTest.java