operator<<
Serialize a string to an output stream.
Synopsis
Defined in header <boost/json/string.hpp>.
std::ostream&
operator<<(
std::ostream& os,
string const& str);
Description
This function serializes a string as JSON into the output stream.
Complexity
Linear in the str.size().
Exception Safety
Strong guarantee. Calls to memory_resource::allocate may throw.
Return Value
Reference to os.
Parameters
| Name | Description |
|---|---|
|
The output stream to serialize to. |
|
The value to serialize. |
Convenience header <boost/json.hpp>