A parser library (JSONC, YAML, TOML) should optionally let you parse comments — what you do with them is your prerogative.
Yes, your job is to parse
52.7%
No, throw comments away
15%
It's complicated
32.3%
Poll ended at .
@fasterthanlime Designing an API that can round-trip decorations and layout is a much more complex problem than merely parsing, and involves some tradeoffs you may not always want (particularly around memory use and throughput). With care, some of the underlying machinery may be shareable between "fast path read-only" and "accurate round trip", but often less than you'd hope. Grafting on a decorated representation after the fact usually results in a mess. And it's not well-trodden with theory.