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.
3#include <sstream>
4
5namespace bb {
6std::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
Entry point for Barretenberg command-line interface.
std::string msgpack_to_json(msgpack::object const &o, size_t max_chars)