That's how the validation tool for Python Maat works. By creating a completely new dictionary.
https://github.com/Attumm/Maat
replies(2):
basically ist’s just functions that take a value of one type and return a other one
I personally use myzod as its fast it parsing, zero dependancies and you can infre types from your schemas.