dmeranda / demjson

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
http://deron.meranda.us/python/demjson/
Other
302 stars 76 forks source link

enum encode error: #22

Open unisgn opened 8 years ago

unisgn commented 8 years ago
    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