pythonlike-json-tool
v0.1.0
Published
JSON.stringify just like Python's json.tool
Readme
python -m json.tool for JavaScript
This module aims to replicate the output of Python's json.tool in JavaScript. This includes indentation and key alphabetization.
In a CommonJS environment (like Node, Webpack, or Browserify):
var pythonlikeJsonToolStringify = require('pythonlike-json-tool')In a browser environment:
<script src="/path/to/pythonlike-json-tool.js"></script>Once it's included:
pythonlikeJsonToolStringify({
key: 'value',
another: 'prop'
})
// {
// "another": "prop",
// "key": "value"
// }