Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
msgpack_to_json.cpp
Go to the documentation of this file.
1
#include "
barretenberg/common/try_catch_shim.hpp
"
2
#include "
barretenberg/serialize/msgpack_impl.hpp
"
3
#include <sstream>
4
5
namespace
bb
{
6
std::string
msgpack_to_json
(msgpack::object
const
& o,
size_t
max_chars)
7
{
8
std::stringstream ss;
9
ss << o;
10
std::string ret = ss.str();
11
if
(max_chars > 0 && ret.size() > max_chars) {
12
ret = ret.substr(0, max_chars) +
"..."
;
13
}
14
return
ret;
15
}
16
}
// namespace bb
msgpack_impl.hpp
bb
Entry point for Barretenberg command-line interface.
Definition
acir_format_getters.cpp:6
bb::msgpack_to_json
std::string msgpack_to_json(msgpack::object const &o, size_t max_chars)
Definition
msgpack_to_json.cpp:6
try_catch_shim.hpp
src
barretenberg
common
msgpack_to_json.cpp
Generated by
1.9.8