@Nullable
  public FlipperObject toFlipperObject(@Nullable RotationOptions rotationOptions) {
    if (rotationOptions == null) {
      return null;
    }
    FlipperObject.Builder optionsJson = new FlipperObject.Builder();
    optionsJson.put("rotationEnabled", rotationOptions.rotationEnabled());
    optionsJson.put("canDeferUntilRendered", rotationOptions.canDeferUntilRendered());
    optionsJson.put("useImageMetadata", rotationOptions.useImageMetadata());
    if (!rotationOptions.useImageMetadata()) {
      optionsJson.put("forcedAngle", rotationOptions.getForcedAngle());
    }
    return optionsJson.build();
  }
Serialization helper to create {@link FlipperObject}s.
tools/flipper-fresco-plugin/src/main/java/com/facebook/flipper/plugins/fresco/objecthelper/FlipperObjectHelper.java