object::operator<<
Serialize object
to an output stream.
Synopsis
Defined in header <boost/json/object.hpp>.
std::ostream&
operator<<(
std::ostream& os,
object const& obj);
Description
This function serializes an object
as JSON into the output stream.
Complexity
Constant or linear in the size of obj
.
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>