nlohmann::json and VTK's public API

  1. My thought was to mitigate this in cases where the JSON data being referenced was owned by a vtkObject subclass; we could have vtkJSONRef own a reference to the VTK object that owns the JSON data.
  2. I agree we would still need to warn developers in cases where JSON data was not owned by a vtkObject:

    You are responsible to ensure the underlying JSON object’s lifetime extends beyond that of every vtkJSONRef that references it.