TomonoriSoejima/Tejun

how to convert yaml into json

Opened this issue · 1 comments

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

  • how to install yq
    sudo dnf install yq
PUT _ingest/pipeline/threat
{
<contents in threat.json>
}

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