wal2json
JSON output plugin for changeset extraction
...Also, UPDATE/DELETE old row versions can be accessed depending on the configured replica identity. Changes can be consumed using the streaming protocol (logical replication slots) or by a special SQL API. format version 1 produces a JSON object per transaction. All of the new/old tuples are available in the JSON object. Also, there are options to include properties such as transaction timestamp, schema-qualified, data types, and transaction ids. format version 2 produces a JSON object per tuple. Optional JSON object for beginning and end of transaction. ...