pulsar-titanium icon indicating copy to clipboard operation
pulsar-titanium copied to clipboard

JSON beautify in console?

Open albert0m opened this issue 6 years ago • 2 comments

The json is not indented, meaning that reading a long JSON through console.log() requires a little effort. Is there any way to manually change this?

albert0m avatar Oct 31 '18 10:10 albert0m

@marconealberto I don't think that the pretty logging would be part of this package. You should be able to call JSON.stringify with a 3rd parameter space which controls the indentation, like console.log(JSON.stringify({some:'json'}, null, '\t')). This does however expose some issues

In iTerm2:

  • iOS logging seems to handle that just fine and indents correctly
  • Android does not indent correctly

With this package:

  • The indentation seems to be lost for all platforms.

I'll take a look into this and see if we can fix that

ewanharris avatar Nov 13 '18 14:11 ewanharris

thank you for your response, hope something can be done because now that I have discovered Atom I don't want to ever go back to Appcelerator-Nightmare-Studio.

Something else that I'm unable to find is the ability to search in the console, am I missing something or it's just not possible?

albert0m avatar Nov 13 '18 17:11 albert0m