On Wednesday, 26 June 2024 at 15:11, juan carlos morales 
<dev.juan.mora...@gmail.com> wrote:

> I also think it would be very useful to have better error messages.
> 
> At the moment, we get things like "Syntax Error" ... period, no clue
> where the JSON is corrupt or anything else. With big JSONs is very
> cumberstone to get to the line and character position where the JSON
> is corrupt .... for example.
> 
> I am already working in a change that would improve error messages
> while working with JSONs.
> 
> What I am very close to achieve is to have error messages like "Syntax
> Error - at character position X near content Y" .... something like
> that.
> 
> I already know that I can do it, actually there is a Work In Progress
> Pull Request for this :
> 
> https://github.com/php/php-src/pull/14672
> 
> 
> I repeat, is work in progress. BUT it can be done. Maybe my approach
> is not the best ... but one way or another .... it can be done.
> 
> Please let me know your ideas, thoughts about this.
> 
> Please, dont kill me for the actual code, is WIP.
> 
> Thanks in advance to everyone.
> 
> Juan

Hello Juan,

I'm in favour of this, but also I do not think this needs an RFC.
This is just an enhancement to our current crappy parsing errors,
and an RFC feels very much overkill for this.

Best regards,

Gina P. Banyard

Reply via email to