Hello, and thanks for creating this wonderful library. I was wondering if you would merge a PR that added YAML as a possible parsing protocol? Seems fairly trivial to add in parser.py, but I wanted to check with you before doing the work. (I would implement using pyyaml unless you think another one would be better)
Thanks for the question, and offering to submit a PR.
The answer is probably no, sorry.
The reason is that on reflection I think that parse.py was a mistake in the first place, and I'm intending to remove it. In turn, my reasoning for removing parsing from pydantic is as follows:
Model.parse_obj(**xxx.loads(data))Model.parse_obj(await request.json())So instead of this, I think it would be better to add a section to the help docs demonstrating how to load data from numerous different formats.
Does this make sense?
That makes perfect sense. I hadn't seen any discussion on adding YAML in the issue tracker or other PR's so I wanted to raise it here, but I definitely see your reasoning for not wanting to add it. Thanks for taking the time to explain.
If you remove parsing from pydantic, what will happen with BaseSettings which currently parses strings as json?
Most helpful comment
Thanks for the question, and offering to submit a PR.
The answer is probably no, sorry.
The reason is that on reflection I think that
parse.pywas a mistake in the first place, and I'm intending to remove it. In turn, my reasoning for removing parsing from pydantic is as follows:Model.parse_obj(**xxx.loads(data))Model.parse_obj(await request.json())So instead of this, I think it would be better to add a section to the help docs demonstrating how to load data from numerous different formats.
Does this make sense?