Skip to content

Conversation

@dylansumser
Copy link

Excellent repo! It's been a great reference as I'm learning about building API clients and unmarshaling JSONs in Go. Hope this small change can improve the repo. Any feedback on my proposal would be greatly appreciated.

Dylan Sumser added 2 commits March 21, 2023 11:45
… byte slice parameter that gets passed in from Properties.UnmarshalJSON
Copy link
Owner

@jomei jomei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @djs-CS! Thanks for the proposal!

Could you please explain the point of these changes? I see that instead of parsing into interface{}, you propose to unmarshal into rawMessage and then unmarshal once again to interface{}. I don't really understand why your approach is better.

@dylansumser
Copy link
Author

@jomei - thank you for the consideration and patience! I'm still new to Go and contributing to Open Source generally, so apologies for being unclear with my previous PR.

Passing rawMessage into parsePageProperties removes the necessity of re-marshaling an interface{} into a JSON only for it to be parsed back into the correct pageProperty. Would love to hear your thoughts! :)

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.

2 participants