Skip to content

Json indentation #316

Merged
merged 4 commits into from Sep 19, 2012

4 participants

@yawnt
yawnt commented Sep 18, 2012

fixes #208

@jfhbrook

Just to clarify: This uses ladder to auto-detect indent settings to pass to the stringifyer, yeah? I mostly ask for the benefit of others reading this PR.

Like I said on IRC: Once ladder gets some basic docs (I'd just copy-paste a repl example into a README.md, add some install instructions and call it a day),... this lgtm.

[edit] accidentally a few words.

@blakmatrix

:+1: I concur with @jesusabdullah about getting docs fleshed out on ladder @yawnt

@yawnt
yawnt commented Sep 18, 2012

push'd some docs

@3rd-Eden
nodejitsu member

It only fixes the indentation and not the formatting of users package.json so this is only a partial fix. If you where to use comma first in your json, it will still get completely rewritten. While using something like jsup as suggested in #87 would retain this.

@jfhbrook

@3rd-Eden jsup can't add new properties, which basically puts its use dead-in-the-water. This approach otoh covers the most common case for formatting choices with very few changes to code and without a custom JSON stringifyer.

Even if we were to get a customizable JSON stringifyer, being able to infer indentation settings would still be useful.

@jfhbrook jfhbrook merged commit 1e6243e into nodejitsu:master Sep 19, 2012

1 check passed

Details default The Travis build passed
@jfhbrook

Thanks @yawnt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.