TomonoriSoejima / Tejun

notes related to working cases
5 stars 3 forks source link

how to convert yaml into json #149

Open TomonoriSoejima opened 1 year ago

TomonoriSoejima commented 1 year ago

Goal, if I want to generate json from yaml format configuration

https://github.com/elastic/integrations/tree/main/packages/panw/data_stream/panos/elasticsearch/ingest_pipeline

yq eval -o=json threat.yml > threat.json

PUT _ingest/pipeline/threat
{
<contents in threat.json>
}
TomonoriSoejima commented 7 months ago

fd computed-config.yaml | xargs -I {} sh -c 'echo "File: {}"; yq eval -o=json "{}" | jq .outputs'