Make ProcotolBase instances aware of whether they're doing serialization or deserialization.
make JsonDocument's JsonEncoder class customizable. #270
Add default_string_encoding argument to JsonDocument instead of always assuming utf8.