cleanjson

0.1.2 • Public • Published

Installation

$ npm install -g cleanjson

CLI Usage

  1. Publish your "dirty" JSON at some URL using services such as http://hastebin.com, http://gist.github.com or http://cl.ly

  2. Acquire a URL that points to "raw" JSON, such as: http://goo.gl/7IiVZ

  3. Run a command such as:

    $ curl -Ls http://goo.gl/7IiVZ | cleanjson
    
  4. Enjoy

Using as a Module

var cj = require('cleanjson');
 
var input = '{"a": 13123, "b": "13123", "ccc": 112}';
 
cj.clean(input, function(err, cleanJSON) {
  
  console.log(cleanJSON);
  process.exit(0);  
  
});

will produce following output:

{
  "a": 13123
, "b": "13123"
, "ccc": 112
}

/cleanjson/

    Package Sidebar

    Install

    npm i cleanjson

    Weekly Downloads

    0

    Version

    0.1.2

    License

    none

    Last publish

    Collaborators

    • irakli