New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

json-fix

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-fix

Command line utility for parsing and fixing json with commons errors like missing ""

  • 0.6.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by900%
Maintainers
4
Weekly downloads
 
Created
Source

json-fix

Command line utility for parsing and fixing json with commons errors like missing ""

Installation

$ npm install json-fix --global

Option spaces

You can specify spaces with --spaces %number of spaces%, it uses 4 as default

Examples

This

{ a: "hello",
 b: "world",
}

converts to

{
    "a": "hello",
    "b": "world"
}

IDEs configuration

Spacemacs/Emacs

  (defun fix-errors-with-json-fix-4 ()
    (interactive)
    (shell-command-to-string (format "json-fix -s 4 %s" buffer-file-name))
    (revert-buffer-no-confirm))
  (defun fix-errors-with-json-fix-2 ()
    (interactive)
    (shell-command-to-string (format "json-fix -s 2 --no-sort %s" buffer-file-name))
    (revert-buffer-no-confirm))
  (spacemacs/set-leader-keys "oj" 'fix-errors-with-json-fix-4)
  (spacemacs/set-leader-keys "ok" 'fix-errors-with-json-fix-2)

Keywords

FAQs

Package last updated on 27 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc