userver: userver/dump/json_helpers.hpp File Reference
Loading...
Searching...
No Matches
json_helpers.hpp File Reference

Detailed Description

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.

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.