Fix a few remaining Python 3 incompatibilities with JSON payloads.
Review Request #10932 — Created March 2, 2020 and submitted
We had a few places in the codebase that were still dealing with JSON
payloads using the wrong string type.
json.loads()on Python 3
requires a Unicode string, and won't work with a byte string. We were
using the wrong type in some unit tests and when validating DVCS commit
This updates the call sites to encode or decode as necessary in order to
json.loads()with Unicode strings.
Unit tests pass on all supported versions of Python.