Json.write
void write(Str& out) const noexcept;
void write(std::ostream& out) const;
Serializes JSON data to either:
- The end of a string, or
- An output stream
Exception Safety
- Str output: No-throw guarantee
- Stream output: Depends on stream implementation
- Standard library streams: Never throws (sets
failbit
on errors) - Custom streams: May propagate their exceptions
- Standard library streams: Never throws (sets
Complexity
Linear time (O(n))
Version
Since v3.0.0 .