rippled
Loading...
Searching...
No Matches
JsonPropertyStream.h
1#ifndef XRPL_JSON_JSONPROPERTYSTREAM_H_INCLUDED
2#define XRPL_JSON_JSONPROPERTYSTREAM_H_INCLUDED
3
4#include <xrpl/beast/utility/PropertyStream.h>
5#include <xrpl/json/json_value.h>
6
7namespace ripple {
8
11{
12public:
15
16public:
18 Json::Value const&
19 top() const;
20
21protected:
22 void
23 map_begin() override;
24 void
25 map_begin(std::string const& key) override;
26 void
27 map_end() override;
28 void
29 add(std::string const& key, short value) override;
30 void
31 add(std::string const& key, unsigned short value) override;
32 void
33 add(std::string const& key, int value) override;
34 void
35 add(std::string const& key, unsigned int value) override;
36 void
37 add(std::string const& key, long value) override;
38 void
39 add(std::string const& key, float v) override;
40 void
41 add(std::string const& key, double v) override;
42 void
43 add(std::string const& key, std::string const& v) override;
44 void
45 array_begin() override;
46 void
47 array_begin(std::string const& key) override;
48 void
49 array_end() override;
50
51 void
52 add(short value) override;
53 void
54 add(unsigned short value) override;
55 void
56 add(int value) override;
57 void
58 add(unsigned int value) override;
59 void
60 add(long value) override;
61 void
62 add(float v) override;
63 void
64 add(double v) override;
65 void
66 add(std::string const& v) override;
67};
68
69} // namespace ripple
70
71#endif
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.
Json::Value const & top() const
void add(std::string const &key, short value) override
std::vector< Json::Value * > m_stack
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6