JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 263
  • Score
    100M100P100Q90880F
  • License MIT

JSON fixer for humans using (relaxed) JSON5

Package Exports

  • fixjson

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fixjson) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

JSON fixer for Humans

fixjson is a source code fixer for humans using (relaxed) JSON5.

fixjson provides:

  • Pretty-prints JSON input
  • Fixes varios failures while humans writing JSON
    • Fixes trailing commas objects or arrays
    • Fixes missing commas of elements of objects or arrays
    • Adds quotes to keys in objects
    • Newlines in strings
    • Hex numbers

Fix Screenshots

TODO

Installation

$ npm install -g fixjson

Usage

$ fixjson [--write|-w|--indent|-i] [paths...]

If paths are given, glob such as dir/**/*.json is available. If the path is a directory, it formats all JSON files in the directory. If no path is given, it reads from STDIN.

If --write (or -w) option is provided, it overwrites files.

If --indent (or -i) is not provided, it detects indent spaces.

Please see fixjson --help for more details.

License

Distributed under the MIT License. Please see LICENSE.