logger: Post a JSON object instead of an array.

Because named arguments are easier to deal with on the server side.

Also adapt server.py to this change.