discord_ipc_cpp
1.0.0
C++ library for interfacing with Discord IPC socket.
Toggle main menu visibility
Loading...
Searching...
No Matches
parser.hpp
1
/*
2
Copyright 2026 Peter Duanmu
3
4
You should have received a copy of the GNU General Public License along
5
with discord_ipc_cpp. If not, see <https://www.gnu.org/licenses/>.
6
*/
7
8
#ifndef DISCORD_IPC_CPP_INCLUDE_DISCORD_IPC_CPP_PARSER_HPP_
9
#define DISCORD_IPC_CPP_INCLUDE_DISCORD_IPC_CPP_PARSER_HPP_
10
11
#include <string>
12
13
#include "discord_ipc_cpp/json.hpp"
14
15
namespace
discord_ipc_cpp::json
{
21
class
Parser {
22
public
:
30
static
JSON
parse
(
const
std::string&
json
);
31
32
private
:
36
const
std::string& _json;
40
size_t
_pos;
41
42
private
:
48
explicit
Parser(
const
std::string&
json
);
49
53
void
skip_whitespace();
62
void
expect(
char
item);
63
71
JSON
parse_value();
72
82
JSON
parse_object();
92
JSON
parse_array();
102
std::string parse_string();
117
JSON
parse_number();
130
JSON
parse_literal();
131
};
132
}
// namespace discord_ipc_cpp::json
133
134
#endif
// DISCORD_IPC_CPP_INCLUDE_DISCORD_IPC_CPP_PARSER_HPP_
discord_ipc_cpp::json::JSON
Basic abstract JSON item.
Definition
json.hpp:69
discord_ipc_cpp::json::Parser::parse
static JSON parse(const std::string &json)
Parses JSON string into discord_ipc_cpp::json::JSON class.
discord_ipc_cpp::json
Custom JSON implementation.
include
discord_ipc_cpp
parser.hpp
Generated by
1.18.0