def to_python(self, value):

        if isinstance(value, dict):
            return value
        elif isinstance(value, six.string_types):
            # Avoid asking the JSON decoder to handle empty values:
            if not value:
                return {}

            try:
                return json.loads(
                    value, use_decimal=True,
                    object_hook=json_decode_hook)
            except ValueError:
                logging.getLogger("plata.fields").exception(
                    "Unable to deserialize stored JSONField data: %s", value)
                return {}
        else:
            assert value is None
            return {}
template_suite : NEWLINE INDENT template_suite_items DEDENT
dataset/ETHPy150Open matthiask/plata/plata/fields.py/JSONField.to_python--crossover with--dataset/ETHPy150Open nucleic/enaml/enaml/core/parser.py/p_template_suite