operator<<

## `operator<<`

Serialize to an output stream.

### Synopsis

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

    std::ostream&
    operator<<(
        std::ostream& os,
        array const& arr);

### Description

This function serializes an `array` as JSON into the output stream.

### Complexity

Constant or linear in the size of `arr`.

### Exception Safety

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

### Return Value

Reference to `os`.

### Parameters

Name | Description
--- | ---
`os` | The output stream to serialize to.
`arr` | The value to serialize.

Convenience header <boost/json.hpp>

Edit this page