tcp server with json output