From ef49fb417f582ec837cde6b551a0bf0cfafe3d4d Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 3 Mar 2021 12:52:21 +0100 Subject: Use cJSON instead of the existing json library --- src/rss_html_common.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/rss_html_common.h') diff --git a/src/rss_html_common.h b/src/rss_html_common.h index 2f9e053..085ddc1 100644 --- a/src/rss_html_common.h +++ b/src/rss_html_common.h @@ -3,9 +3,7 @@ #define MAX_UPDATE_ITEMS 10 -struct json_value_s; -struct json_object_s; -struct json_string_s; +typedef struct cJSON cJSON; typedef struct { const char *title; @@ -15,7 +13,7 @@ typedef struct { typedef struct { char *title; char *link; - struct json_object_s *json_data; + cJSON *json_data; } TrackedItem; int write_plugin_json_to_file(const char *dir, const char *filename, const char *url, const char *updated, const char *start_after, const char *start_after_url, const char *plugin_name); @@ -29,8 +27,5 @@ int write_plugin_json_to_file(const char *dir, const char *filename, const char @tracked_dir is also modified and then restored at the end. */ int tracked_item_update_latest(TrackedItem *tracked_item, char *tracked_dir, DownloadItemsData **download_items, char **filenames, long *timestamps, int num_download_items); -struct json_value_s* json_object_get_field_by_name(struct json_object_s *json_obj, const char *name); -void create_json_string(struct json_string_s *json_result, const char *str, int len); -void init_json_value_str(struct json_value_s *json_value, struct json_string_s *json_str); #endif \ No newline at end of file -- cgit v1.2.3