remove the dependency on github.com/json-iterator/go. #539
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
That module uses github.com/modern-go/reflect2 which is broken.
First, it is brittle because it relies on golang's implementation details that are not stable across golang releases. For example, reflect2 was broken when go 1.18 came out.
Second, reflect2 is effectively unmaintained:
modern-go/reflect2#24 (comment)
Json-iterator itself has had correctness issues like
json-iterator/go#413.
The Kubernetes project has mostly removed the dependency on json-iterator in patches like
kubernetes/kubernetes#105030.
Moreover, the Kubernetes authors found it out that json-iterator puts a lot of load on the allocator, so even the performance gains are questionable.
Let us remove dependencies on json-iterator and reflect2.