[Docker] Convert yml ⇆ json

Execute the following command

$ docker run -it -v $PWD:/mnt/ --rm python:3.7-alpine sh 

Install necessary libraries etc.

/ # cd mnt; apk add jq; pip install yq

Convert from yaml to json, json to xml

$ yq "." [Yml file you want to convert] > [Converted json file]

Recommended Posts

[Docker] Convert yml ⇆ json
Convert ruby object to JSON format
docker
Run Embulk on Docker to convert files
Convert JSON to TSV and TSV to JSON with Ruby