json-fixer
A JSON fixer
Last updated 4 years ago by berkmann18 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install json-fixer 
SYNC missed versions from official npm registry.

json-fixer

NPM

GitHub package version devDependencies Status dependencies Status

GH Downloads GitHub commit activity the past year GitHub contributors Github search hit counter

Build Status codecov.io Code Coverage tested with jest Known Vulnerabilities

GitHub contributions welcome Commitizen friendly

GitHub top language GitHub language count GitHub code size in bytes

BCH compliance Codacy Badge

A JSON file fixer primarly focused to be used in a NodeJS file.

Usage

  • In NodeJS
const jsonFix = require('json-fixer')
const fs = require('fs')

// Get the (potentially malformed) JSON data ready
const jsonContent = fs.readFileSync('config.json', 'utf-8')

const {data, changed} = jsonFix(jsonContent) // Lint (and fix) it

if (changed) {
  // Do something with `data` which is the fixed JSON parsed data from `jsonContent`
  // e.g. `fs.writeFileSync(configPath, JSON.stringify(data, null, 2))`
}
  • In the CLI
    Not supported yet (PR welcome).

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Maximilian Berkmann

πŸ’» πŸ“– πŸ€” 🚧 ⚠️ πŸ›‘οΈ

Semantic Release Bot

πŸ“¦ πŸ“–

all-contributors[bot]

πŸ“–

Ben Kucera

πŸ’»

Svetozar Mateev

πŸ› πŸ’»

AndrΓ© Paulo

πŸ›

Erkin Matkaziev

πŸ›

Codacy Badger

πŸš‡ πŸ“–

GiraffeKey

πŸ’» ⚠️

jonasmaertens

πŸ›

George Tsotsos

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

Current Tags

  • 1.6.15                                ...           latest (2 years ago)

33 Versions

  • 1.6.15                                ...           2 years ago
  • 1.6.14                                ...           2 years ago
  • 1.6.13                                ...           3 years ago
  • 1.6.12                                ...           3 years ago
  • 1.6.11                                ...           3 years ago
  • 1.6.10                                ...           3 years ago
  • 1.6.9                                ...           4 years ago
  • 1.6.8                                ...           4 years ago
  • 1.6.7                                ...           4 years ago
  • 1.6.6                                ...           4 years ago
  • 1.6.5                                ...           4 years ago
  • 1.6.4                                ...           4 years ago
  • 1.6.3                                ...           4 years ago
  • 1.6.2                                ...           4 years ago
  • 1.6.1                                ...           4 years ago
  • 1.6.0                                ...           4 years ago
  • 1.5.4                                ...           4 years ago
  • 1.5.3                                ...           4 years ago
  • 1.5.2                                ...           4 years ago
  • 1.5.1                                ...           4 years ago
  • 1.5.0                                ...           4 years ago
  • 1.4.3                                ...           4 years ago
  • 1.4.2                                ...           4 years ago
  • 1.4.1                                ...           5 years ago
  • 1.4.0                                ...           5 years ago
  • 1.3.3                                ...           5 years ago
  • 1.3.2                                ...           5 years ago
  • 1.3.1                                ...           5 years ago
  • 1.3.1-0                                ...           5 years ago
  • 1.3.0                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Total 23
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 18
Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE