Closed kjczarne closed 2 years ago
@kjczarne I am not sure if you are aware, but any valid JSON is also valid YAML, so you can use the yaml parser to also parse JSON
@kayoub5 yes, the packages in Python are separate for YAML and JSON but they yield the identical data structure. All I need to do is use the json
module on JSON files and pyyaml
on YAML files and feed it directly to the data model. And hence we can use the JSON schema (#7) to validate both YAML and JSON at the same time 😉
@kjczarne you don't get what I mean, yaml.parse
accept json input
Hmm, I wasn't aware of that. I'll try parsing a JSON with pyyaml then to check.
Ok, this is embarrassing. It works perfectly. Years of developing in Python and I didn't know PyYaml had this ability 😆
Is your feature request related to a problem? Please describe.
7 - this means we can win JSON support for free.
Describe the solution you'd like
Describe alternatives you've considered N/A
Additional context N/A