xrpld
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:
12 json::Value topValue; // TODO: rename: clashes with top() method
14
15public:
17 [[nodiscard]] json::Value const&
18 top() const;
19
20protected:
21 void
22 mapBegin() override;
23 void
24 mapBegin(std::string const& key) override;
25 void
26 mapEnd() 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 arrayBegin() override;
45 void
46 arrayBegin(std::string const& key) override;
47 void
48 arrayEnd() 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
Abstract stream with RAII containers that produce a property tree.
Represents a JSON value.
Definition json_value.h:130
json::Value const & top() const
void add(std::string const &key, short value) override
std::vector< json::Value * > stack
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5