GitHub Actions to JSON
Convert CI/CD workflow YAML to JSON for programmatic analysis and manipulation.
Switch tool:
Examples:
💡 Paste your YAML and it converts to JSON automatically. Perfect for converting Kubernetes and Docker Compose configs.
Code Examples
Here's how to achieve this in different programming languages:
1// Using js-yaml library (npm install js-yaml)2import yaml from 'js-yaml';34const yamlData = `name: CI5on:6 push:7 branches:8 - main9jobs:10 build:11 runs-on: ubuntu-latest12 steps:13 - uses: actions/checkout@v414 - name: Run tests15 run: npm test`;16const parsed = yaml.load(yamlData);17const jsonOutput = JSON.stringify(parsed, null, 2);18console.log(jsonOutput);1920// Output:21// {22// "name": "CI",23// "on": {24// "push": {25// "branches": ["main"]...
More YAML Examples
Kubernetes YAML to JSON
Convert a Kubernetes Pod YAML configuration to JSON format.
Docker Compose to JSON
Convert Docker Compose YAML configuration to JSON format.
Simple YAML to JSON
Basic example of converting YAML configuration to JSON.
Nested YAML to JSON
Convert deeply nested YAML configuration to JSON.