Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
sampo
on Jan 12, 2023
|
parent
|
context
|
favorite
| on:
The Yaml document from hell
Is there a tool that parses yaml and outputs json, so you could check if the yaml you wrote parses as you intent?
ancieque
on Jan 12, 2023
|
next
[–]
I guess this can easily be scripted with
https://pypi.org/project/yq/
Internally this seems to be a wrapper around jq :)
chriswarbo
on Jan 12, 2023
|
prev
|
next
[–]
I use
https://kislyuk.github.io/yq
(it also includes and 'xq' command, which converts XML to JSON)
jwilk
on Jan 13, 2023
|
prev
[–]
gojq (
https://github.com/itchyny/gojq
) and fq (
https://github.com/wader/fq
) can read YAML and output JSON.
But that won't nescessarily help, because other parsers can intepreret that YAML differently.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: