Use the FORMAT option, to retrieve the output of EXPLAIN in a different format, such as JSON, XML, and YAML. This could allow us to write programs to manipulate the outputs.
The following command is an example of this:
EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) SELECT count(*) FROM t;