Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/json: second decode after error impossible #31701
What version of Go are you using (
Agreed that it's inelegant, but is this really a common use case for the json package? I've used the package for many things over the last five years, and never have I needed to skip a syntax error and keep decoding some input.
This seems like a feature request or proposal to me, so it should be backed by some evidence to show that it's needed and useful in many cases. If not, having the user write a bit of extra code for the rare cases where one needs this specific behavior seems fine to me.