JSON to Environment Converter
I made a thing!
I needed to translate some JSON configuration (like the appsettings.json
file used by ASP.NET Core) into equivalent environment variables (so that they could be set in a Dockerfile). Rather than try and figure it out, I created a simple web tool to do the conversion for me.
- Paste your JSON into the first text field
- Select the formatting options
- Dockerfile-style or Yaml (suitable for
docker-compose.yml
orazure-pipelines.yml
) - Whether to include entries with a key but no value
- Use colons or underscores as separators
- Dockerfile-style or Yaml (suitable for
- Press Convert
- Review and/or copy the text that appears in the second text field.
You can find it at https://jsontoenvironmentconverter.azurewebsites.net/, and the source code is at https://github.com/flcdrg/JsonToEnvironmentConverter