Skip to content

Conversation

@phlptp
Copy link
Contributor

@phlptp phlptp commented Mar 23, 2022

to take a string length to support things like a string_view more directly.

The valueToQuotedString method is useful for a few other items related to JSON generation. In many cases we had to use it directly from a std::string_view, which in the present code required conversion to a string, then using the c_str and it computing the length. So this PR adds an overload that allows direct specification of the string length. and a few places in the code that could take advantage of it.

Co-authored-by: Billy Donahue <BillyDonahue@users.noreply.github.com>
Copy link
Contributor

@BillyDonahue BillyDonahue left a comment

Choose a reason for hiding this comment

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

This looks fine to me. It doesn't break backward compatibility AFAICT.

@baylesj baylesj merged commit 034976a into open-source-parsers:master Sep 10, 2024
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