isaacs/npm — Issue #1925: npm outputs invalid json
Author: DavidIAm
Created: 2011-12-22 20:56:55+00:00
State: open

Json spec:

A string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes.

When I execute commands like npm view, the output is not dissimilar from json - it might even be javascript - but what it is definitely NOT is JSON.

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?