logoalt Hacker News

supriyo-biswasyesterday at 6:31 PM1 replyview on HN

Personally I’d pass all my JSON-y stuff through Pydantic or similar which would take care of these concerns.


Replies

bastawhiztoday at 1:41 AM

It wouldn't. If you load configuration and it's the wrong type, now Pydantic is throwing an error. You can't run code if the config is invalid no matter what tools you use: failing validation is still an error.