0.1.0 • Published 7 years ago
pythonlike-json-tool v0.1.0
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"
// }
0.1.0
7 years ago