pickler: simplify _flatten_key_value_pair()
This method no longer needs to handle keys=True, so we can
simplify the logic down to the essentials.
Related-to:
@@ -609,10 +609,7 @@ class Pickler(object):
"""Flatten a key/value pair into the passed-in dictionary."""
if not util.is_picklable(k, v):
return data
- if self.keys:
- if not isinstance(k, string_types) or k.startswith(tags.JSON_KEY):
- k = self._escape_key(k)
- else:
+
if k is None:
k = 'null' # for compatibility with common json encoders
