.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.webutils.JSONEncoder Class Reference
+ Inheritance diagram for searx.webutils.JSONEncoder:
+ Collaboration diagram for searx.webutils.JSONEncoder:

Public Member Functions

 default (self, o)
 

Detailed Description

Definition at line 148 of file webutils.py.

Member Function Documentation

◆ 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 searx.webutils.JSONEncoder.default().

Referenced by searx.settings_defaults.SettingsDirectoryValue.__call__(), searx.settings_defaults.SettingsValue.__call__(), and searx.webutils.JSONEncoder.default().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: