Save processing time (and bandwidth) by using struct.pack over json.

Signed-off-by: Chris Lamb <chris@keyerror.com>