1 2 3 4
import sys, json, tomllib data = tomllib.load(open(0,'rb',closefd=False)) json.dump(data, sys.stdout, separators=(',',':'))