-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix field marshaller #73
Conversation
Code Climate has analyzed commit 3f3c273 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 98.5% (0.0% change). View more on Code Climate. |
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.
can you explain what the problem was ?
When reading the code, I understand that if we pass an object as value ... the json.Marshall won't work ?
it will fix the |
so there was no issue with other objects ? |
case BoolType, Int8Type, Int16Type, Int32Type, Int64Type, Uint8Type, Uint16Type, Uint32Type, Uint64Type, UintptrType, Float32Type, Float64Type: | ||
return []byte(f.String()), nil | ||
case SkipType, Complex64Type, Complex128Type, StringType, BinaryType, ByteStringType, ErrorType, TimeType, DurationType, StringerType: | ||
return strconv.AppendQuote([]byte{}, f.String()), nil |
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.
use Quote
instead ;-)
Which object have you in mind? |
well any type of object actually 👍 what makes an Error object not directly JSON marshallable whereas other objects are ? |
I don't really understand the problem and the solution neither... @rmasclef pay attention to the return type of |
No description provided.