json icon indicating copy to clipboard operation
json copied to clipboard

Add serde_json::error::Error::msg() method

Open gmorer opened this issue 5 years ago • 2 comments

Actually it is not possible to have the error message without the line and column number.

I had to parse a file with one object by line, the error line was always 1 but not necessary in the file.

You cant get the line and column with serde_json::error::Error::{line,column} but the error message from the ErrorCode is private.

You can now get only missing field `type` instead of the whole missing field `type` at line 1 column 26

gmorer avatar Oct 13 '20 22:10 gmorer

Is there any progress on this?

2ndDerivative avatar Jan 07 '25 23:01 2ndDerivative

No idea, waiting for maintainers to approve or disapprove.

gmorer avatar Jan 11 '25 19:01 gmorer