to_json Returns the JSON object representing this preferences. :returns: the JSON representation for this preferences
(self)
| 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 | |
| 277 | class Preferences(): |
no test coverage detected