private static Object jsonNullOr(@Nullable Object obj) {
    return obj == null ? JSONObject.NULL : obj;
  }
Dumps information about the accessibility hierarchy into a JSON object
core/src/main/java/com/facebook/testing/screenshot/layouthierarchy/AccessibilityHierarchyDumper.java