On Wed, Jun 10, 2020 at 4:09 PM J. Pic email@example.com wrote:
Good point, but then I'm not sure the decoder could be used for untrusted json anymore.
Another solution would be to generate a schema in a separate variable, which would represent the JSON structure with Python types.
For that there are many existing libraries. You might like one of my recent projects: