event: use JSON decoder instead of raw connection

event: fix eof
container: include container name given by option