(raw)
| 5 | |
| 6 | |
| 7 | def _parse(raw): |
| 8 | if raw is None or isinstance(raw, (dict, list, int, float)): |
| 9 | return raw |
| 10 | |
| 11 | assert isinstance(raw, str) |
| 12 | try: |
| 13 | return json.loads(raw) |
| 14 | except json.JSONDecodeError: |
| 15 | return raw |
| 16 | |
| 17 | |
| 18 | def _diff_vals(old, new, with_unchanged): |