#json #json5 #convert #translate #read

app j5j

A bare-bones tool for converting JSON5 to plain JSON

1 unstable release

0.2.0 Aug 20, 2022

#13 in #json5

ISC license

9KB

j5j

Reads JSON5 from one or more files and prints it as plain old JSON.

Based on `json5-to-json by @callum-oakley.

Examples

:; 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"
  ]
}

Dependencies

~5MB
~98K SLoC