40 template<
class t_stream>
42 template<
class t_stream>
44 template<
class t_stream>
46 template<
class t_stream>
48 template<
class t_stream>
50 template<
class t_stream>
52 template<
class t_stream,
class t_type>
53 void dump_as_json(t_stream& strm,
const t_type& v,
size_t indent,
bool insert_newlines);
54 template<
class t_stream>
55 void dump_as_json(t_stream& strm,
const section& sec,
size_t indent,
bool insert_newlines);
63 template<
class t_stream>
70 bool insert_newlines =
true)
74 template<
class t_type>
80 auto last_it = --
a.m_array.end();
81 for(
auto it =
a.m_array.begin(); it !=
a.m_array.end(); it++)
92 template<
class t_stream>
99 bool insert_newlines =
true)
103 template<
class visited_type>
110 template<
class t_stream>
114 boost::apply_visitor(aesv, ae);
117 template<
class t_stream>
121 boost::apply_visitor(sv, se);
124 template<
class t_stream>
130 template<
class t_stream>
133 strm << static_cast<int32_t>(v);
136 template<
class t_stream>
139 strm << static_cast<int32_t>(v);
142 template<
class t_stream>
153 template<
class t_stream,
class t_type>
159 template<
class t_stream>
162 size_t local_indent =
indent + 1;
163 std::string newline = insert_newlines ?
"\r\n" :
"";
164 strm <<
"{" << newline;
172 dump_as_json(strm, it->second, local_indent, insert_newlines);
Definition: binary_utils.h:36
::std::string string
Definition: gtest-port.h:1097
t_stream & m_strm
Definition: portable_storage_to_json.h:95
t_stream & m_strm
Definition: portable_storage_to_json.h:66
boost::variant< uint64_t, uint32_t, uint16_t, uint8_t, int64_t, int32_t, int16_t, int8_t, double, bool, std::string, section, array_entry > storage_entry
Definition: portable_storage_base.h:161
Definition: portable_storage_to_json.h:64
size_t m_indent
Definition: portable_storage_to_json.h:67
unsigned char uint8_t
Definition: stdint.h:124
Definition: portable_storage_base.h:82
void dump_as_json(t_stream &strm, const array_entry &ae, size_t indent, bool insert_newlines)
Definition: portable_storage_to_json.h:111
bool m_insert_newlines
Definition: portable_storage_to_json.h:97
void operator()(const array_entry_t< t_type > &a)
Definition: portable_storage_to_json.h:75
boost::make_recursive_variant< array_entry_t< section >, array_entry_t< uint64_t >, array_entry_t< uint32_t >, array_entry_t< uint16_t >, array_entry_t< uint8_t >, array_entry_t< int64_t >, array_entry_t< int32_t >, array_entry_t< int16_t >, array_entry_t< int8_t >, array_entry_t< double >, array_entry_t< bool >, array_entry_t< std::string >, array_entry_t< section >, array_entry_t< boost::recursive_variant_ > >::type array_entry
Definition: portable_storage_base.h:159
std::string transform_to_escape_sequence(const std::string &src)
Definition: parserse_base_utils.cpp:42
storage_entry_store_to_json_visitor(t_stream &strm, size_t indent, bool insert_newlines=true)
Definition: portable_storage_to_json.h:98
std::string make_indent(size_t indent)
Definition: portable_storage_to_json.h:58
signed char int8_t
Definition: stdint.h:121
Definition: portable_storage_base.h:168
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
Definition: pointer.h:1124
Definition: portable_storage_to_json.h:93
TODO: (mj-xmr) This will be reduced in an another PR.
Definition: byte_slice.h:39
void operator()(const visited_type &v)
Definition: portable_storage_to_json.h:104
bool m_insert_newlines
Definition: portable_storage_to_json.h:68
std::map< std::string, storage_entry > m_entries
Definition: portable_storage_base.h:170
array_entry_store_to_json_visitor(t_stream &strm, size_t indent, bool insert_newlines=true)
Definition: portable_storage_to_json.h:69
size_t m_indent
Definition: portable_storage_to_json.h:96
indent
Definition: transfer.py:36