diff --git a/source/dub/internal/configy/Read.d b/source/dub/internal/configy/Read.d index 44afcf162f..dff6a92a9a 100644 --- a/source/dub/internal/configy/Read.d +++ b/source/dub/internal/configy/Read.d @@ -490,6 +490,11 @@ private TLFR.Type parseMapping (alias TLFR) if (k[p.length .. $].length > 1 && k[p.length] == '-') continue FIELD; + // Ignore key starting with _ (escape hatch for comments in JSON). + // See: DUB Issue #2567 + if (k.startsWith("_")) + continue FIELD; + if (ctx.strict == StrictMode.Warn) { scope exc = new UnknownKeyConfigException(