Subject: bug#79192: json parsing error position reform

From: Eli Zaretskii <[email-masked]>
Date: Sat, 09 Aug 2025 17:16:56 +0300

> From: Mattias Engdegård <[email-masked]>
> Date: Sat, 9 Aug 2025 16:08:12 +0200
> Cc: [email-masked],
>  Dmitry Gutov <[email-masked]>,
>  Ship Mints <[email-masked]>
> 
> 7 aug. 2025 kl. 20.22 skrev Eli Zaretskii <[email-masked]>:
> 
> > Every tool that reports errors or hits shows line numbers, and
> > sometimes also column numbers.  So it looks like a reasonable thing to
> > expect.
> 
> But the json parser isn't a tool, it's a low-level primitive that can be used to make tools.
> Having it produce line and column numbers makes as much sense as doing that from `re-search-forward`.
> Or, if you prefer, from one of our two (three?) XML parser APIs. It just not how APIs are designed.

What are the practical problems of calculating the line number only
when an error is about to be reported?  That shouldn't affect
performance, so I don't see why we would be against doing that.