Skip to content

Added support for ints, uints and float32#2

Open
bt wants to merge 2 commits into
TylerBrock:masterfrom
bt:master
Open

Added support for ints, uints and float32#2
bt wants to merge 2 commits into
TylerBrock:masterfrom
bt:master

Conversation

@bt
Copy link
Copy Markdown

@bt bt commented Mar 20, 2019

I added support for various int and uint types, as well as float32.

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 use reflect but it's quite a bit slower.

@gavincarr
Copy link
Copy Markdown

Could this be merged @TylerBrock ?

@TylerBrock
Copy link
Copy Markdown
Owner

Ah yeah, sorry for the delay. I might be able to spend some time on PRs this week. Stay tuned.

@TylerBrock
Copy link
Copy Markdown
Owner

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.

@bt
Copy link
Copy Markdown
Author

bt commented Jan 27, 2022

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.

@TylerBrock
Copy link
Copy Markdown
Owner

TylerBrock commented Jan 27, 2022 via email

@bt
Copy link
Copy Markdown
Author

bt commented Jan 28, 2022

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 go.mod file has been removed.

Let me know if there's any further requirements for the PR and I'll see what I can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants