-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(processTags): remove extra qoutes that added to slice and map type #407
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?
fix(processTags): remove extra qoutes that added to slice and map type #407
Conversation
when use json tag have a string value it should convert numbers and boolean to string but iy should not add qoutes to slice and map type as go json package do. issue json-iterator#395
9b1354e
to
3c4fb2b
Compare
Codecov Report
@@ Coverage Diff @@
## master #407 +/- ##
=======================================
Coverage 81.72% 81.72%
=======================================
Files 41 41
Lines 5029 5029
=======================================
Hits 4110 4110
Misses 798 798
Partials 121 121
Continue to review full report at Codecov.
|
please include tests for the bug |
@taowen Do you need to add more test cases ? I think that the coverage decreased because
|
IMO, if the field's type is struct or implements |
@@ -1042,7 +1042,7 @@ func (decoder *stringModeNumberDecoder) Decode(ptr unsafe.Pointer, iter *Iterato | |||
} | |||
c = iter.readByte() | |||
if c != '"' { | |||
iter.ReportError("stringModeNumberDecoder", `expect ", but found `+string([]byte{c})) | |||
iter.ReportError("stringModeNonStringDecoder", `expect ", but found `+string([]byte{c})) |
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.
Maybe it needs a testcase to cover these new added lines to avoid the coverage diff reported by codecov.
when use json tag have a string value it should convert numbers and boolean to string
but it should not add qoutes to slice and map type as go json package do.
issue #395