-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add JSON marshalling and unmarshalling #71
Conversation
Signed-off-by: krishna sindhur <[email protected]>
Signed-off-by: krishna sindhur <[email protected]>
Signed-off-by: krishna sindhur <[email protected]>
# Conflicts: # wirebson/bson_test.go
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.
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (5)
wirebson/bson_test.go:370
- The JSON key is empty. JSON keys should be meaningful and not empty to avoid confusion and potential issues.
"": "foo",
wirebson/bson_test.go:796
- The JSON key is empty. JSON keys should be meaningful and not empty to avoid confusion and potential issues.
"": false,
wirebson/array.go:184
- The new method MarshalJSON should be covered by tests to ensure its functionality.
func (arr *Array) MarshalJSON() ([]byte, error) {
wirebson/array.go:209
- The new method UnmarshalJSON should be covered by tests to ensure its functionality.
func (arr *Array) UnmarshalJSON(b []byte) error {
wirebson/binary.go:91
- The removal of the conditional check before making a slice and copying bytes might introduce unintended behavior if 'i' is zero. Consider restoring the check.
res.B = make([]byte, i)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #71 +/- ##
==========================================
- Coverage 63.88% 62.93% -0.95%
==========================================
Files 41 41
Lines 2337 2396 +59
==========================================
+ Hits 1493 1508 +15
- Misses 662 702 +40
- Partials 182 186 +4
Flags with carried forward coverage won't be shown. Click here to find out more. |
Closes #49.
Closes #70.