This repository has been archived on 2026-11-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2026-11-05 02:19:09 +01:00

29 lines
590 B
C++

#pragma once
#pragma warning(disable : 4996)
class c_json
{
public:
c_json() = default;
~c_json();
void reset() noexcept;
bool parse(const char* data) noexcept;
bool is_equal(int index, const char* text);
const auto count() { return m_count; }
int get_value_integer(const char* name);
bool get_value_boolean(const char* name);
double get_value_double(const char* name);
private:
void get_value_internal(int index, char* buffer, size_t length);
private:
int m_count;
char* m_json;
jsmn_parser m_parser;
jsmntok_t m_tok[1024];
};