json-to-go icon indicating copy to clipboard operation
json-to-go copied to clipboard

Elaborate on the error [feature suggestion]

Open petric3 opened this issue 3 years ago • 1 comments

I'm getting pretty long streamed json messages of different struct. Errors like the following one happens quite often. image

It's quite clear that there's redundant/empty space but it's very hard to locate it at the given position. Is it possible to elaborate on the error's position, e.g. if empty space, then give extra say 10 before and after characters to be easier searched for, or even better to jump to that position where the error is. Thank you for consideration.

petric3 avatar Jun 13 '22 06:06 petric3

Thanks for the request. It's a good idea, but I don't generate the error message. I'm not sure if it has a particular structure or if it's just a string. If it's just a string then getting its position would be a bit hacky and inelegant. But if we could then maybe we could augment the error message ourselves to display surrounding text.

mholt avatar Jun 13 '22 15:06 mholt