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

Add std::string_view support #1578

Closed
paulocsanz opened this issue Jun 3, 2021 · 2 comments
Closed

Add std::string_view support #1578

paulocsanz opened this issue Jun 3, 2021 · 2 comments
Milestone

Comments

@paulocsanz
Copy link
Contributor

paulocsanz commented Jun 3, 2021

We heavily use non-zero-terminated std::string_view's through our code, but we are not able to serialize them.

Support for std::string_view was mentioned in #704 as something of interest for this lib, but it seems the discussion ended with the stream solution. It's not clear to me how to use it, I will understand it better, but it seems official support for std::string_view still would be very useful.

Are there plans for direct support?

So I'm opening this issue as a request for std::string_view support in JsonDocument's operator[].

@bblanchon
Copy link
Owner

Hi @paulocsanz,

PR #1554 should already provide partial support for std::string_view, including operator[].
I plan on adding the complete support for std::string_view soon, possibly in v6.18.1.

Best regards,
Benoit

@bblanchon
Copy link
Owner

This feature is available in ArduinoJson 6.18.1

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants