Send raw JSON to server.

Parsing and re-serialising JSON doesn't work properly for some content,
specifically it doesn't work for passing single quoted strings that
lose their quotes when sent to the server.

Fixes #1777.