The solution is to start an effort to go back to all of these legacy GNU and non-GNU command line utilities that output text data and add a JSON output option to them. All operating system APIs, like the /proc and /sys filesystems should serialize their files in JSON or provide the data in an alternative API that outputs JSON.

Source: Bringing the Unix Philosophy to the 21st Century

I’ve had this idea before too. I’m not sure if everything should be JSON all the time, but it would be nice to have the option more often.