(value: Any, default: Any)
| 121 | ] |
| 122 | |
| 123 | |
| 124 | def _load_json(value: Any, default: Any) -> Any: |
| 125 | if value in (None, ""): |
| 126 | return default |
| 127 | if isinstance(value, (dict, list)): |
| 128 | return value |
| 129 | try: |
| 130 | return json.loads(value) |
| 131 | except (TypeError, json.JSONDecodeError): |
| 132 | return default |
| 133 | |
| 134 |
no outgoing calls
no test coverage detected