rippled
Loading...
Searching...
No Matches
include/xrpl/json/Output.h
1#pragma once
2
3#include <boost/beast/core/string.hpp>
4
5#include <functional>
6#include <string>
7
8namespace Json {
9
10class Value;
11
12using Output = std::function<void(boost::beast::string_view const&)>;
13
14inline Output
16{
17 return [&](boost::beast::string_view const& b) { s.append(b.data(), b.size()); };
18}
19
25void
26outputJson(Json::Value const&, Output const&);
27
35
36} // namespace Json
T append(T... args)
Represents a JSON value.
Definition json_value.h:130
JSON (JavaScript Object Notation).
Definition json_errors.h:5
Output stringOutput(std::string &s)
std::string jsonAsString(Json::Value const &)
Return the minimal string representation of a Json::Value in O(n) time.
std::function< void(boost::beast::string_view const &)> Output
void outputJson(Json::Value const &, Output const &)
Writes a minimal representation of a Json value to an Output in O(n) time.