Definition at line 148 of file webutils.py.
◆ default()
| searx.webutils.JSONEncoder.default |
( |
| self, |
|
|
| o ) |
Definition at line 149 of file webutils.py.
149 def default(self, o):
150 if isinstance(o, datetime):
151 return o.isoformat()
152 if isinstance(o, timedelta):
153 return o.total_seconds()
154 if isinstance(o, set):
155 return list(o)
156 return super().default(o)
157
158
References default().
Referenced by default().
The documentation for this class was generated from the following file:
- /home/andrew/Documents/code/public/searxng/searx/webutils.py