#json #json5 #convert #translate #read

app j5j

将JSON5转换为普通JSON的简化工具

1 个不稳定版本

0.2.0 2022年8月20日

#13 in #json5

ISC 许可证

9KB

j5j

从一个或多个文件中读取JSON5并将其打印为普通JSON。

基于`json5-to-json by @callum-oakley`。

示例

:; j5j .devcontainer/devcontainer.json
{"extensions":["DavidAnson.vscode-markdownlint","kokakiwi.vscode-just","NathanRidley.autotrim","redhat.vscode-yaml","rust-lang.rust-analyzer","samverschueren.final-newline","tamasfe.even-better-toml"],"image":"ghcr.io/linkerd/dev:v30","mounts":["source=/var/run/docker.sock,target=/var/run/docker-host.sock,type=bind"],"name":"j5j","overrideCommand":false,"remoteUser":"code","runArgs":["--init","--memory=12g","--memory-swap=12g","--net=host"]}
:; j5j --pretty .devcontainer/devcontainer.json
{
  "extensions": [
    "DavidAnson.vscode-markdownlint",
    "kokakiwi.vscode-just",
    "NathanRidley.autotrim",
    "redhat.vscode-yaml",
    "rust-lang.rust-analyzer",
    "samverschueren.final-newline",
    "tamasfe.even-better-toml"
  ],
  "image": "ghcr.io/linkerd/dev:v30",
  "mounts": [
    "source=/var/run/docker.sock,target=/var/run/docker-host.sock,type=bind"
  ],
  "name": "j5j",
  "overrideCommand": false,
  "remoteUser": "code",
  "runArgs": [
    "--init",
    "--memory=12g",
    "--memory-swap=12g",
    "--net=host"
  ]
}

依赖项

~6MB
~115K SLoC