NeatJSON
NeatJSON copied to clipboard
Pretty-print your JSON in Ruby, JS, or Lua with more power than JSON.stringify or JSON.pretty_generate
the command to generate the below output is `JSON.neat_generate(env, after_colon: 1, padding: 1)`. `env` contains the ruby hash object used to generate the output. the output somehow has the `_template`...
This PR makes the NeatJSON JS available in the Rails asset pipeline. With these changes, including the NeatJSON JS in a Rails app is as easy as adding this to...
Input: ``` ["#{test}"] ``` Pry log of failure: ``` [1] pry(main)> require 'neatjson' true [2] pry(main)> test = JSON.parse(File.open('test.json').read) [ [0] "\#{test}" ] [3] pry(main)> puts test.to_json ["#{test}"] nil [4]...
The approach to determine the line breaks by wrapping works in many - but not in all cases. Would it be possible to provide a list of keys and applicable...
In the [neatjson gem on rubygems.org](https://rubygems.org/gems/neatjson/versions/0.8.1), you mention that it includes the JavaScript version, but [the JavaScript version](https://github.com/Phrogz/NeatJSON/tree/master/javascript) is not in the gem: ``` . ├── lib │ └── neatjson.rb...
``` /home/ubuntu/workspace/jsbot/node_modules/neatjson.js:45 }else if (o instanceof Array){ ^ RangeError: Maximum call stack size exceeded ``` with some huge objects:  and prettifier code: 
In case people like [the crazy](https://gist.github.com/isaacs/357981). ``` js var o = { a : "ape" , b : "bat" , c : "cat" , d : "dog" , e :...
The `before_comma`, `after_comma`, `around_comma` options apply to both single-line arrays and objects. - `before_comma` should become a shorthand for `before_array_comma` and `before_object_comma`. - `after_comma` should become a shorthand for `after_array_comma`...
For Ruby (or in general) it would be nice to be able to configure default options for `neat_generate`. That is, options that are used of no options argument is provided...