Steps to reproduce
Open the sandbox vault (Help → Open sandbox vault), then make one unresolved target linked from a single file whose folder name contains a comma, and a second one linked from two files:
$ obsidian "vault=Obsidian Sandbox" create path="Notes, drafts/One.md" content="[[Alpha]]"
$ obsidian "vault=Obsidian Sandbox" create path="Two.md" content="[[Beta]]"
$ obsidian "vault=Obsidian Sandbox" create path="Three.md" content="[[Beta]]"
$ obsidian "vault=Obsidian Sandbox" unresolved verbose format=json
Did you follow the troubleshooting guide? [Y/N]
Y. Reproduced in the sandbox vault, so no community plugin or theme takes part
Expected result
format=json exists so the output can be consumed by a program, so a field holding several files should be an array and a count should be a number:
[
{ "link": "Alpha", "count": 1, "sources": ["Notes, drafts/One.md"] },
{ "link": "Beta", "count": 2, "sources": ["Two.md", "Three.md"] }
]
Actual result
[
{
"link": "Alpha",
"count": "1",
"sources": "Notes, drafts/One.md"
},
{
"link": "Beta",
"count": "2",
"sources": "Three.md, Two.md"
}
]
Both sources values contain , , and nothing in the output says that the first names one file and the second names two. Splitting on , is not merely fragile, it is undecidable from the output, because a file name may legally contain a comma. count does not settle it either: it counts occurrences of the link rather than source files, so a note linking the same missing target twice reports 2 against a single source
This is not an edge case on a real vault. On one of 5512 files, 24 of the 59 unresolved records carry a sources value containing , , and the output gives no way to tell which of them name more than one file
Environment
Obsidian 1.13.7, installer 1.13.7, Linux. Reproduced in the sandbox vault
Additional information
The join appears to happen before the formatter runs, rather than being specific to JSON. format=csv quotes the same value correctly as a single field, so the CSV is well-formed and equally ambiguous:
$ obsidian "vault=Obsidian Sandbox" unresolved verbose format=csv
Alpha,1,"Notes, drafts/One.md"
Beta,2,"Three.md, Two.md"
Every value in the CLI’s JSON also arrives as a string: unresolved gives "count": "2", backlinks counts gives "count": "1", tasks gives "line": "9". The one exception found is properties counts, which returns "count": 777 as a real number and is also the only command whose format list reads yaml|json|tsv rather than json|tsv|csv
That reads as the tab-separated rows being wrapped in JSON rather than the underlying data being serialised. If that is the shape of it, fixing it at the serialisation layer would give both arrays and typed numbers across every command at once
Related: Structured JSON Output for Obsidian CLI asked for machine-readable output before format= shipped; this report is about the output that did ship