Relative Content

Tag Archive for pythonjsonpydantic

Define constraints for different JSON schema models in a list

I have some JSON with a structure similar to what is shown below. The threshold list represents objects where the type can be "type": "upper_limit" or "type": "range". Notice the "target" value should be an integer or float depending on the type of the object.