-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyjson.h
More file actions
24 lines (18 loc) · 676 Bytes
/
myjson.h
File metadata and controls
24 lines (18 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef MYJSON_H
#define MYJSON_H
#include <stdlib.h>
#include <string.h>
#include <jansson.h>
#include <stdio.h>
const char *choices_array[18];
extern json_t *weather_json_struct;
/*Take as input 2 json strings:
First: Current Weather json
Second: Forecast Weather
After extracting the necessary values of the items hat we need, it creates our own json struct dynamically.
The function returns the pointer of that json struct.*/
json_t *createJsonStruct(char *, char *);
/*Take as an input the whole response of a GET request (Header + Body).
Then it extract the body from the header and return only the body as a string*/
char * JsonHeaderRemover(char * );
#endif