Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upfix(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 #395
9b1354e
to
3c4fb2b
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})) | |||
AllenX2018
Jan 14, 2020
Collaborator
Maybe it needs a testcase to cover these new added lines to avoid the coverage diff reported by codecov.
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