def _default ( self , obj ) : return obj . __dict__ if isinstance ( obj , JsonObj ) else json . JSONDecoder ( ) . decode ( obj )
python decode jsonify object
return a serialized version of obj or raise a TypeError
def _default(self, obj):
        """ return a serialized version of obj or raise a TypeError

        :param obj:
        :return: Serialized version of obj
        """
        return obj.__dict__ if isinstance(obj, JsonObj) else json.JSONDecoder().decode(obj)