A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes.
The output of this command is hence useless for automation. Surely it would not be difficult to use a standard pretty-printer to output this information in legal JSON notation?
"npm info" is the command I was speaking of.
It would be nice if there was a way to interact with npm in a parseable api way. Its nice to not have to reengineer npm's capabilities when they're already implimented so nicely.
I suppose in the end it would end up splitting npm into controller/view sections and having an api view and a CLI view...
The output of npm view is also not really JSON. It ignores the --json option.
+1. I have some use cases where node view|info outputting valid json would make my life much easier.
Fix #1925 Respect --json in view
info and view are the same command, btw. Will be fixed in 1.1.62.