{"id":14985656,"url":"https://github.com/hilleer/vscode-yaml-plus-json","last_synced_at":"2026-03-10T09:06:26.759Z","repository":{"id":37389170,"uuid":"238239628","full_name":"hilleer/vscode-yaml-plus-json","owner":"hilleer","description":"Vscode extension making conversion between yaml and json fast and simple","archived":false,"fork":false,"pushed_at":"2025-06-26T08:38:57.000Z","size":1684,"stargazers_count":24,"open_issues_count":7,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-26T09:38:19.023Z","etag":null,"topics":["conversion","json","json-converter","yaml","yaml-convertor","yml"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=hilleer.yaml-plus-json","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hilleer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-04T15:32:46.000Z","updated_at":"2025-06-26T08:39:00.000Z","dependencies_parsed_at":"2023-12-25T12:56:20.938Z","dependency_job_id":"57918d53-0c64-411f-b041-bdac292e1600","html_url":"https://github.com/hilleer/vscode-yaml-plus-json","commit_stats":{"total_commits":318,"total_committers":3,"mean_commits":106.0,"dds":0.449685534591195,"last_synced_commit":"4eed7e91b994fd614dfb9ce46599779b641653cb"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/hilleer/vscode-yaml-plus-json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hilleer%2Fvscode-yaml-plus-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hilleer%2Fvscode-yaml-plus-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hilleer%2Fvscode-yaml-plus-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hilleer%2Fvscode-yaml-plus-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hilleer","download_url":"https://codeload.github.com/hilleer/vscode-yaml-plus-json/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hilleer%2Fvscode-yaml-plus-json/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266897218,"owners_count":24002642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["conversion","json","json-converter","yaml","yaml-convertor","yml"],"created_at":"2024-09-24T14:11:26.319Z","updated_at":"2026-03-10T09:06:26.739Z","avatar_url":"https://github.com/hilleer.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/hilleer"],"categories":[],"sub_categories":[],"readme":"# YAML :heart: JSON\n\n[![vscode marketplace installations](https://img.shields.io/visual-studio-marketplace/i/hilleer.yaml-plus-json?cacheSeconds=86400)](https://marketplace.visualstudio.com/items?itemName=hilleer.yaml-plus-json)\n[![vscode marketplace rating](https://img.shields.io/visual-studio-marketplace/r/hilleer.yaml-plus-json?cacheSeconds=86400)](https://marketplace.visualstudio.com/items?itemName=hilleer.yaml-plus-json)\n[![CodeQL](https://github.com/hilleer/vscode-yaml-plus-json/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/hilleer/vscode-yaml-plus-json/actions/workflows/github-code-scanning/codeql)\n[![extension CI](https://github.com/hilleer/vscode-yaml-plus-json/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/hilleer/vscode-yaml-plus-json/actions/workflows/ci.yaml)\n[![License: MIT](https://img.shields.io/github/license/hilleer/vscode-yaml-plus-json)](https://github.com/hilleer/vscode-yaml-plus-json/blob/main/LICENSE)\n\n\u003e Convert YAML to or from JSON directly in VS Code — single files, entire folders, text selections, or via live preview. Preserves comments when converting to JSONC.\n\nAny good ideas or feature requests? Please, do not hesitate to open [a new issue](https://github.com/hilleer/vscode-yaml-plus-json/issues/new)!\n\n## Features and usage\n\n![Overview](https://raw.githubusercontent.com/hilleer/vscode-yaml-plus-json/main/docs/demo.gif)\n\nSee more usage examples in [the docs directory](https://github.com/hilleer/vscode-yaml-plus-json/blob/main/docs).\n\n- **Convert a single file:**\n  - Convert a YAML file to JSON or JSONC by right clicking it and selecting `Convert to JSON`.\n  - Convert a YAML file to JSON or JSONC by changing file extension to `.json` or `.jsonc`.\n  - Convert a JSON or JSONC file to YAML by right clicking it and selecting `Convert to YAML`.\n  - Convert a JSON or JSONC file to YAML by changing file extension to `.yaml` or `.yml`.\n- **Convert selection as preview:**\n  - Convert YAML selection as preview by using command `YAML+JSON: Preview as JSON (from YAML. Opens in new file)`\n  - Convert JSON selection as preview by using command `YAML+JSON: Preview as YAML (from JSON. Opens in new file)`\n- **Convert text selection:**\n  - Convert YAML selection by using command `Convert selection to JSON` - _does not_ change file extension.\n  - Convert JSON selection by using command `Convert selection to YAML` - _does not_ change file extension.\n- **Converting multiple files:**\n  - Convert a selection of JSON files to YAML by right clicking one of the selected files and selecting `Convert selected files to YAML`.\n  - Convert a selection of YAML files to JSON by right clicking one of the selected files and selecting `Convert selected files to JSON`.\n  - Convert YAML files in a directory to JSON by right clicking the directory and selecting `Convert YAML files to JSON`.\n  - Convert JSON files in a directory to YAML by right clicking the directory and selecting `Convert JSON files to YAML`.\n- **Comment preservation (YAML to or from JSONC):**\n  - When converting between YAML and JSONC, comments are preserved by default (`preserveComments: true`).\n  - YAML `#` comments map to JSONC `//` comments and vice versa.\n  - To use this feature, set `fileExtensions.json` to `\".jsonc\"`.\n  - Plain `.json` files cannot hold comments, so comment preservation only applies to `.jsonc`.\n  - **Note:** Multi-document YAML files fall back to plain JSON array output (no comment preservation).\n- **Convert on save:** When `convertOnSave` is enabled, saving a YAML or JSON file will automatically create (or update) its counterpart file. The original file is always kept. The `overwriteExistentFiles` setting controls what happens when the counterpart already exists.\n- **Reverting converted files:** When a file has been reverted, a _\"revert\"_ prompt will be shown to revert it. Using this will return the entirety of the original file, including YAML comments.\n- **Overwriting existent files:** When trying to convert a file into a destination that already exist, you can use the `overwriteExistentFiles` configuration to overwrite such. **Notice** if you use the revert feature after overwriting a file, the extension cannot (currently) revert the overwritten file. Also, due to limitation in vscode of active user prompts, if you set it to `\"ask\"` you will only be prompted to overwrite N number of files, while others will be skipped.\n\n## Config\n\nAll configurations should be defined in the `yaml-plus-json` object of your vscode settings (e.g. in a workspace file `.vscode/settings.json`). Example:\n\n```jsonc\n{\n  \"yaml-plus-json\": {\n    \"convertOnRename\": true,\n    \"convertOnSave\": false,\n    \"yamlIndent\": 2,\n    \"yamlLineWidth\": 0,\n    \"yamlMerge\": false,\n    \"fileExtensions\": {\n      \"yaml\": \".yaml\",\n      \"json\": \".jsonc\", // use \".jsonc\" for comment preservation\n    },\n    \"preserveComments\": true,\n    // for more advanced parser configurations\n    // see the YAML module documentation for details:\n    // https://github.com/eemeli/yaml/blob/main/docs/03_options.md#options\n    // note specific extension configs set takes precedence (\"yamlIndent\" for example)\n    \"yamlOptions\": {\n      \"indent\": 2,\n      \"lineWidth\": 0,\n    },\n  },\n}\n```\n\n\u003c!-- use table generator to parse and update: https://www.tablesgenerator.com/markdown_tables --\u003e\n\n|                          | description                                                                                                                                                                                                 | type    | default   | example    |\n| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------- | ---------- |\n| `convertOnRename`        | Convert YAML/JSON files on rename                                                                                                                                                                           | boolean | `true`    | `false`    |\n| `convertOnSave`          | Automatically convert YAML/JSON files to their counterpart on save. The original file is always kept.                                                                                                       | boolean | `false`   | `true`     |\n| `yamlIndent`             | The number of spaces to use when indenting code (yaml)                                                                                                                                                      | number  | `2`       | `4`        |\n| `yamlSchema`             | See [yaml module documentation](https://github.com/eemeli/yaml/blob/master/docs/03_options.md#schema-options) for details                                                                                   | string  | `\"core\"`  | `\"json\"`   |\n| `yamlMerge`              | Enable support for \u003c\u003c merge keys. Default value depends on YAML version.                                                                                                                                    | boolean | `true`    | `false`    |\n| `yamlLineWidth`          | Set to 0 to disable line wrapping. See [line width options](https://github.com/eemeli/yaml/blob/main/docs/03_options.md#tostring-options) for details                                                       | number  |           | `100`      |\n| `fileExtensions`         | define what filename extension(s) to use when converting file(s)                                                                                                                                            | object  |           |            |\n| `fileExtensions.yaml`    | yaml filename extension                                                                                                                                                                                     | string  | `\".yaml\"` | `\".yml\"`   |\n| `fileExtensions.json`    | json filename extension. Use `\".jsonc\"` to enable comment preservation.                                                                                                                                     | string  | `\".json\"` | `\".jsonc\"` |\n| `keepOriginalFiles`      | Keep original files when converting. Use `\"ask\"` to be asked every time or `\"always\"` to always keep original files                                                                                         | string  |           | `\"always\"` |\n| `overwriteExistentFiles` | Overwrite existent files when converting. Use `\"ask\"` to be asked every time or `\"always\"` to always overwrite                                                                                              | string  |           | `\"always\"` |\n| `yamlOptions`            | For more advanced configs using the YAML parser. See the module [docs](https://github.com/eemeli/yaml/blob/main/docs/03_options.md) for details. Note that specific extension configs set takes precedence. | object  |           |            |\n| `preserveComments`       | Preserve comments when converting between YAML and JSONC. Requires `fileExtensions.json` set to `\".jsonc\"`.                                                                                                 | boolean | `true`    | `false`    |\n| `directoryConversion`    | Enable the right-click commands that convert all JSON/YAML files in a directory (applies to folders only). Set to `false` to hide these commands from the explorer context menu.                            | boolean | `true`    | `false`    |\n\n---\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/hilleer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhilleer%2Fvscode-yaml-plus-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhilleer%2Fvscode-yaml-plus-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhilleer%2Fvscode-yaml-plus-json/lists"}