13#ifndef __FPSDK_COMMON_TO_JSON_PARSER_HPP__
14#define __FPSDK_COMMON_TO_JSON_PARSER_HPP__
19#include <nlohmann/json.hpp>
28inline void to_json(nlohmann::json& j,
const ParserMsg& m)
30 j = nlohmann::json::object({
36 if (!m.info_.empty()) {
42 if (std::all_of(m.data_.data(), m.data_.data() + m.data_.size(),
43 [](
const uint8_t c) { return std::isprint(c) || std::isspace(c); })) {
const char * ProtocolStr(const Protocol proto)
Stringify Protocol.
std::string BufToStr(const std::vector< uint8_t > &buf)
Convert buffer to string.
std::string Base64Enc(const std::vector< uint8_t > &buf)
Encode to base64.
Message frame output by the Parser.