Previously, server always sent back "hex" types as JSON integers but would only accept setting them as a
JSON string of hex digits. This still works, but also possible to use JSON integers in both directions.
Add tests for both representations, add a note in the README about types.