MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / to_json

Method to_json

web/pgadmin/utils/preferences.py:249–274  ·  view source on GitHub ↗

to_json Returns the JSON object representing this preferences. :returns: the JSON representation for this preferences

(self)

Source from the content-addressed store, hash-verified

247 return ret_val
248
249 def to_json(self):
250 """
251 to_json
252 Returns the JSON object representing this preferences.
253
254 :returns: the JSON representation for this preferences
255 """
256 res = {
257 'id': self.pid,
258 'cid': self.cid,
259 'name': self.name,
260 'label': self.label or self.name,
261 'type': self._type,
262 'help_str': self.help_str,
263 'control_props': self.control_props,
264 'min_val': self.min_val,
265 'max_val': self.max_val,
266 'options': self.options,
267 'select': self.select,
268 'value': self.get(),
269 'fields': self.fields,
270 'hidden': self.hidden,
271 'disabled': self.disabled,
272 'dependents': self.dependents
273 }
274 return res
275
276
277class Preferences():

Callers 3

to_jsonMethod · 0.45
preferencesMethod · 0.45
preferencesFunction · 0.45

Calls 1

getMethod · 0.95

Tested by

no test coverage detected