Minor updates to support a custom JSON protocol.