Now that we're using pydantic 2 and not dynamically changing the extra fields at runtime (https://github.com/DiamondLightSource/mx-bluesky/pull/456) we should not need to have our custom from_json method and just be able to use model_validate_json. However, when I tried to do this I found a number of validation errors in the tests.
Acceptance Criteria
We use the pydantic functions for converting json to models and remove from_json
Now that we're using pydantic 2 and not dynamically changing the extra fields at runtime (https://github.com/DiamondLightSource/mx-bluesky/pull/456) we should not need to have our custom
from_json
method and just be able to usemodel_validate_json
. However, when I tried to do this I found a number of validation errors in the tests.Acceptance Criteria
from_json