Convenience functions to load and dump as JSON in classes derived from components::CachingComponentBase.
Definition in file json_helpers.hpp.
Go to the source code of this file.
#include <memory>
#include <string>
#include <string_view>
#include <userver/dump/common.hpp>
#include <userver/dump/operations.hpp>
#include <userver/dump/unsafe.hpp>
#include <userver/formats/json/serialize.hpp>
#include <userver/formats/json/string_builder.hpp>
#include <userver/formats/json/value.hpp>
Namespaces | |
namespace | dump |
Dumping of cache-like components. | |
Functions | |
template<typename T > | |
void | dump::WriteJson (Writer &writer, const T &contents) |
Convenience function to use in components::CachingComponentBase::WriteContents override to dump a type in a human readable JSON format. | |
template<typename T > | |
std::unique_ptr< const T > | dump::ReadJson (Reader &reader) |
Convenience function to use in components::CachingComponentBase::ReadContents override to load a dump in a human readable JSON format. | |