Skip to content

Json indentation #316

merged 4 commits into from Sep 19, 2012

4 participants

yawnt commented Sep 18, 2012

fixes #208


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, add some install instructions and call it a day),... this lgtm.

[edit] accidentally a few words.


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

yawnt commented Sep 18, 2012

push'd some docs

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.


@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

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.