Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/json: JSON tags don't handle empty properties, non-standard characters #22518
What did you do?
Trying to unmarshal with tags like this:
What did you expect to see?
What did you see instead?
This is because of
This change seems too narrow-sighted. An
A more generalized solution might be to allow a quoted string as the name argument:
However, this looks ugly since it requires double escaping.
Personally, I'm okay with the fact that the
From #29476 .
I think it's a great pity that we can't use Chinese punctuation as json's key. But in fact, I still have other ways to avoid this situation.
What I encountered was that I had to add