Please set JSON indent to 1 on export

Please set JSON indent to any number (1 is just fine) on export. While it makes no difference to the machine-readability of the file, it makes it orders of magnitude more human-readable.

As an example of an export with only a single site, please see the following. Exports with multiple sites benefit even more, but I’m trying to keep this concise.

With no indent set (currently):
{'client': {'local': 1}, 'data': [{'name': 'KeePass Password Safe', 'uri': '', 'config': '{"selections":[{"frames":[{"index":0,"excludes":[],"includes":[{"type":"css","expr":"p:nth-child(9)","fields":[{"name":"text","type":"builtin"}]}]}],"dynamic":true,"delay":2}],"ignoreEmptyText":true,"includeStyle":false,"dataAttr":"text","regexp":{"expr":"","flags":"gim"}}', 'tags': [], 'content_type': 2, 'state': 40, 'schedule': '{"type":"INTERVAL","params":{"interval":4106}}', 'ts': '2023-11-03T21:05:31.142Z', 'datasource_id': None}]}

With indent set to 1:

 "client": {
  "local": 1
 "data": [
   "name": "KeePass Password Safe",
   "uri": "",
   "config": "{\"selections\":[{\"frames\":[{\"index\":0,\"excludes\":[],\"includes\":[{\"type\":\"css\",\"expr\":\"p:nth-child(9)\",\"fields\":[{\"name\":\"text\",\"type\":\"builtin\"}]}]}],\"dynamic\":true,\"delay\":2}],\"ignoreEmptyText\":true,\"includeStyle\":false,\"dataAttr\":\"text\",\"regexp\":{\"expr\":\"\",\"flags\":\"gim\"}}",
   "tags": [],
   "content_type": 2,
   "state": 40,
   "schedule": "{\"type\":\"INTERVAL\",\"params\":{\"interval\":4106}}",
   "ts": "2023-11-03T21:05:31.142Z",
   "datasource_id": null

Thanks for sharing the feedback @blivetwidget. Do you generally edit the JSON after exporting it and before importing it?

View to see what’s in there? Sometimes. Edit? Generally no, though a human readable export would make it a lot easier for someone to assemble a watch list from other watch lists.

My point is more that it’s trivially easy to implement and for anyone who ever has a reason to look at the export, a convenience. It’s a single parameter passed to json.dump(). No change is needed for the parameters to json.load() because it already implicitly ignores non-data whitespace.

What would be a reason not to do it this way?

The why something is done depends on needs and use cases. Thanks for sharing your perspective.