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

Json read string view #312

Merged
merged 2 commits into from
Dec 22, 2024

Conversation

aligirayhanozbay
Copy link
Contributor

Hi, this is a very simple PR to change rfl::json::read to use std::string_view instead of std::string. This allows JSON to be read in a zero-copy way when e.g. one has a const char*. Because std::string_view can be implicitly constructed from std::string, the change should have no impact on existing user code.

I verified that all json parser tests pass with this change.

@liuzicheng1987
Copy link
Contributor

@aligirayhanozbay, looks great. I will run the test pipelines and if they all pass, I will merge this.

@liuzicheng1987
Copy link
Contributor

@aligirayhanozbay, thanks for the contribution!

@liuzicheng1987 liuzicheng1987 merged commit 7affb4e into getml:main Dec 22, 2024
9 checks passed
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