-
Notifications
You must be signed in to change notification settings - Fork 26
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
Added support for ints, uints and float32 #2
base: master
Are you sure you want to change the base?
Conversation
Could this be merged @TylerBrock ? |
Ah yeah, sorry for the delay. I might be able to spend some time on PRs this week. Stay tuned. |
It doesn't look like we can merge this one as is because of the included go.mod. I'm also on the fence for including this functionality as the library is meant to print unmarshalled json... I'll have to think on that a bit. |
Understood, hence I mentioned in my PR. Let me know if you'd like me to remove the |
Yes please do, lets start there and review what’s left.
On Wed, Jan 26, 2022 at 10:51 PM Bertram Truong ***@***.***> wrote:
It doesn't look like we can merge this one as is because of the included
go.mod.
I'm also on the fence for including this functionality as the library is
meant to print unmarshalled json... I'll have to think on that a bit.
Understood, hence I mentioned in my PR.
Let me know if you'd like me to remove the go.mod for the merge, if you'd
accept.
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACERZYUYEDFRMNI6FR6RYLUYC6NPANCNFSM4G72YEBQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
…-Tyler
|
Done! The Let me know if there's any further requirements for the PR and I'll see what I can do. |
I added support for various
int
anduint
types, as well asfloat32
.I understand that your library was targeting unmarshalled JSON structs, so this might not be in scope. I am using
colorjson
to pretty-print my structs for debugging purposes and noticed that since these types aren't implemented, they return as an empty string in the output.Also, unsure if there's a better way to implement this; Golang doesn't seem to like grouping
int
/uint
types together and then type casting, so I have to make a case for each. The other option would of course be to usereflect
but it's quite a bit slower.