Initial commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#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];
|
||||
};
|
||||
Reference in New Issue
Block a user