Python module for JSON data encoding, including jsonlint. See the project Wiki here on Github. Also read the README at the bottom of this page, or the project homepage at
def encode_enum(self, val, state):
"""Encode a Python Enum value into JSON."""
eas = self.options.encode_enum_as
if eas == 'qname':
self.encode_string( str(obj), state )
elif eas == 'value':
self._do_encode( obj.value, state )
else: # eas == 'name'
self.encode_string( obj.name, state )
the param name is in trouble