@Nullable
  public FlipperObject toFlipperObject(@Nullable ImagePerfData imagePerfData) {
    if (imagePerfData == null) {
      return null;
    }
    FlipperObject.Builder objectJson = new FlipperObject.Builder();
    // NULLSAFE_FIXME[Parameter Not Nullable]
    objectJson.put("requestId", imagePerfData.getRequestId());
    objectJson.put("controllerSubmitTimeMs", imagePerfData.getControllerSubmitTimeMs());
    objectJson.put("controllerFinalTimeMs", imagePerfData.getControllerFinalImageSetTimeMs());
    objectJson.put("imageRequestStartTimeMs", imagePerfData.getImageRequestStartTimeMs());
    objectJson.put("imageRequestEndTimeMs", imagePerfData.getImageRequestEndTimeMs());
    objectJson.put("imageOrigin", "UNKNOWN");
    objectJson.put("isPrefetch", imagePerfData.isPrefetch());
    // NULLSAFE_FIXME[Parameter Not Nullable]
    objectJson.put("callerContext", imagePerfData.getCallerContext());
    objectJson.put("imageRequest", toFlipperObject((ImageRequest) imagePerfData.getImageRequest()));
    objectJson.put("imageInfo", toFlipperObject((ImageInfo) imagePerfData.getImageInfo()));
    return objectJson.build();
  }
Serialization helper to create {@link FlipperObject}s.
tools/flipper-fresco-plugin/src/main/java/com/facebook/flipper/plugins/fresco/objecthelper/FlipperObjectHelper.java