-
Notifications
You must be signed in to change notification settings - Fork 65
Migrate to encoding/json/v2 #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Tim Ramlot <[email protected]>
Signed-off-by: Tim Ramlot <[email protected]>
Signed-off-by: Tim Ramlot <[email protected]>
For the
|
a4b6871
to
bdce391
Compare
I fixed the test failure. |
/assign @BenTheElder @liggitt |
/assign @jpbetz |
I suspect using a json marshal function (like MarshalWrite) that doesn't append a newline would be a more efficient way to accomplish that |
fieldpath/serialize-pe.go
Outdated
return nil, fmt.Errorf("parsing JSON: %v", err) | ||
} | ||
|
||
k := rawKey.String() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is rawKey.String() the same as decoding to a string, in terms of interpreting escape sequences, etc?
{ | ||
JSON: `1.0`, | ||
IntoType: reflect.TypeOf(json.Number("")), | ||
Want: json.Number("1.0"), | ||
}, | ||
{ | ||
JSON: `1`, | ||
IntoType: reflect.TypeOf(json.Number("")), | ||
Want: json.Number("1"), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious if it's ok to drop these... were they added to try to catch a specific issue?
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: inteon The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The The serialize benchmarks still look pretty rough. Need to see what we can improve there. |
did you run the full set of benchmarks to see how we looked across all of them? |
Replaces the
github.com/json-iterator/go
dependency withencoding/json/v2
.Performance is not yet great (feel free to push improvements/ create new PRs based on this PR):
closes #202