You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
600 B

/**
* @file json_flat.h
* @brief Парсер плоского JSON без вложенности: {"key":"value",...}
*
* Только строковые значения. Без malloc, без зависимостей.
*/
#ifndef JSON_FLAT_H
#define JSON_FLAT_H
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef int (*json_flat_cb)(const char* key, const char* value, void* arg);
int json_flat_parse(const char* json, json_flat_cb cb, void* arg);
int json_flat_get(const char* json, const char* key, char* value_out, size_t value_sz);
#ifdef __cplusplus
}
#endif
#endif