extend demo to be able to send JSON