Skip to content
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

Templated cast function for reading JSON values #726

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thevbw
Copy link

@thevbw thevbw commented Dec 6, 2023

I have not tested this code (sorry) but it aims to solve the problem of reading to smaller types like uint32_t and uint16_t.
The string stream implementation should throw up warnings where applicable for unsupported types.

Copy link
Member

@dranikpg dranikpg left a comment

Choose a reason for hiding this comment

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

It's useful for reading types like int8/16, but beware that in case of overflow it'll be silent (but safe). Leaving for others to decide

@gittiver gittiver added the discussion The viability / implementation of the issue is up for debate label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion The viability / implementation of the issue is up for debate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants