hilleer / vscode-yaml-plus-json

Vscode extension making conversion between yaml and json fast and simple
https://marketplace.visualstudio.com/items?itemName=hilleer.yaml-plus-json
MIT License
23 stars 4 forks source link
conversion json json-converter yaml yaml-convertor yml

YAML :heart: JSON

CodeQL extension CI

Easily convert YAML to JSON or vice versa. Conversion can be done by each individual file or by all files in a folder.

Any good ideas or feature requests? Please, do not hesitate to open a new issue!

Features and usage

Config

All configurations should be defined in yaml-plus-json in vscode settings (e.g. .vscode/settings.json), like:

{
  "yaml-plus-json": {
    "convertOnRename": true,
    "yamlIndent": 2,
    "fileExtensions": {
      "yaml": ".yaml",
      "json": ".json"
    }
  }
}
id description type default example
convertOnRename Convert YAML/JSON files on rename boolean true false
yamlIndent The number of spaces to use when indenting code (yaml) number 2 4
yamlSchema See yaml module documentation for details string "core" "json"
fileExtensions define what filename extension(s) to use when converting file(s) object
fileExtensions.yaml yaml filename extension string ".yaml" ".yml"
fileExtensions.json json filename extension string ".json" ".json"
keepOriginalFiles Keep original files when converting. Use "ask" to be asked every time or "always" to always keep original files string "always"
overwriteExistentFiles Overwrite existent files when converting. Use "ask" to be asked every time or "always" to always overwrite string "always"

"Buy Me A Coffee"