Reads the list of installed Debian or Ubuntu packages on a system and outputs them as a JSON document on stdout.