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