The etf_parser class can serialise and deserialise ETF (Erlang Term Format) into and out of an nlohmann::json object, so that layers above the websocket don't have to be any different for handling ETF. More...
#include "etf.h"
Public Member Functions | |
etf_parser () | |
Construct a new etf parser object. More... | |
~etf_parser () | |
Destroy the etf parser object. More... | |
nlohmann::json | parse (const std::string &in) |
Convert ETF binary content to nlohmann::json. More... | |
The etf_parser class can serialise and deserialise ETF (Erlang Term Format) into and out of an nlohmann::json object, so that layers above the websocket don't have to be any different for handling ETF.
dpp::etf_parser::etf_parser | ( | ) |
Construct a new etf parser object.
|
default |
Destroy the etf parser object.
json dpp::etf_parser::parse | ( | const std::string & | in | ) |
Convert ETF binary content to nlohmann::json.
in | Raw binary ETF data (generally from a websocket) |
dpp::exception | Malformed or otherwise invalid ETF content |
Referenced by dpp::discord_client::handle_frame().