Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext
object::operator<<

Serialize object to an output stream.

Synopsis

Defined in header <boost/json/object.hpp>

friend std::ostream&
operator<<(
    std::ostream& os,
    object const& obj);
Description

This function serializes an object as JSON into the output stream.

Return Value

Reference to os.

Complexity

Constant or linear in the size of obj.

Exception Safety

Strong guarantee. Calls to memory_resource::allocate may throw.

Parameters

Name

Description

os

The output stream to serialize to.

obj

The value to serialize.

Convenience header <boost/json.hpp>


PrevUpHomeNext