pythonlike-json-tool

0.1.0 • Public • Published

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"
// }

Readme

Keywords

none

Package Sidebar

Install

npm i pythonlike-json-tool

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • evanhahn