-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab.c
More file actions
31 lines (26 loc) · 710 Bytes
/
lab.c
File metadata and controls
31 lines (26 loc) · 710 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
25
26
27
28
29
30
31
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// #include <standardloop/json.h>
#include "./json.h"
int main(void)
{
// JSON *json = StringToJSON("[{\"guid\": \"\", \"about\": \"\"}]");
// JSON *json = StringToJSON("{\"foo\": \"\"}");
// JSON *json = StringToJSON("{\"guid\": \"foo\", \"about\": \"bar\"}");
JSON *json = JSONFromFile("./private/lab/1mil.json");
if (json == NULL)
{
return EXIT_FAILURE;
}
// PrintJSON(json);
// FreeJSON(json);
char *json_string = JSONToString(json, true);
if (json_string == NULL)
{
return EXIT_FAILURE;
}
// printf("%s", json_string);
free(json_string);
return EXIT_SUCCESS;
}