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. Also, there's still simple regexp pattern matching that could also be good enough.
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/L4AMRUI45LPJJAYGDEUKDOKXC7XSQ3FY/ Code of Conduct: http://python.org/psf/codeofconduct/