Installation
$ npm install -g cleanjson
CLI Usage
-
Publish your "dirty" JSON at some URL using services such as http://hastebin.com, http://gist.github.com or http://cl.ly
-
Acquire a URL that points to "raw" JSON, such as: http://goo.gl/7IiVZ
-
Run a command such as:
$ curl -Ls http://goo.gl/7IiVZ | cleanjson
-
Enjoy
Using as a Module
var cj = ; var input = '{"a": 13123, "b": "13123", "ccc": 112}'; cj;
will produce following output:
"a": 13123 "b": "13123" "ccc": 112