userver: logging::JsonString Class Reference
Loading...
Searching...
No Matches
logging::JsonString Class Reference

#include <userver/logging/json_string.hpp>

Detailed Description

One line json string. JSON log formats write such tags directly as a sub-JSON, without packing them in a string.

Definition at line 17 of file json_string.hpp.

Public Member Functions

 JsonString (const formats::json::Value &value)
 Constructs from provided json object. The generated json string is an one line string.
 
 JsonString (std::string json) noexcept
 Constructs from provided json string. It is the user's responsibility to ensure that the input json string is valid. New lines will be removed during construction.
 
 JsonString () noexcept=default
 Constructs null json (see GetValue for details)
 
 JsonString (JsonString &&) noexcept=default
 
 JsonString (const JsonString &)=default
 
JsonStringoperator= (JsonString &&) noexcept=default
 
JsonStringoperator= (const JsonString &)=default
 
std::string_view GetView () const noexcept
 Returns view to json.
 

The documentation for this class was generated from the following file: