rippled
Loading...
Searching...
No Matches
JsonPropertyStream.h
1#pragma once
2
3#include <xrpl/beast/utility/PropertyStream.h>
4#include <xrpl/json/json_value.h>
5
6namespace xrpl {
7
10{
11public:
14
15public:
17 Json::Value const&
18 top() const;
19
20protected:
21 void
22 map_begin() override;
23 void
24 map_begin(std::string const& key) override;
25 void
26 map_end() override;
27 void
28 add(std::string const& key, short value) override;
29 void
30 add(std::string const& key, unsigned short value) override;
31 void
32 add(std::string const& key, int value) override;
33 void
34 add(std::string const& key, unsigned int value) override;
35 void
36 add(std::string const& key, long value) override;
37 void
38 add(std::string const& key, float v) override;
39 void
40 add(std::string const& key, double v) override;
41 void
42 add(std::string const& key, std::string const& v) override;
43 void
44 array_begin() override;
45 void
46 array_begin(std::string const& key) override;
47 void
48 array_end() override;
49
50 void
51 add(short value) override;
52 void
53 add(unsigned short value) override;
54 void
55 add(int value) override;
56 void
57 add(unsigned int value) override;
58 void
59 add(long value) override;
60 void
61 add(float v) override;
62 void
63 add(double v) override;
64 void
65 add(std::string const& v) override;
66};
67
68} // namespace xrpl
Represents a JSON value.
Definition json_value.h:130
Abstract stream with RAII containers that produce a property tree.
A PropertyStream::Sink which produces a Json::Value of type objectValue.
std::vector< Json::Value * > m_stack
void add(std::string const &key, short value) override
Json::Value const & top() const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5