28 lines
436 B
C
28 lines
436 B
C
#include "aliases.h"
|
|
#include "json_entities.h"
|
|
#include "lexer.h"
|
|
#include "parser.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
int main(int argc, char *argv[]) {
|
|
if (argc < 2) {
|
|
printf("NO FILE PROVIDED\n");
|
|
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
const char *filename = argv[1];
|
|
|
|
jentity_t *root = load_json(filename);
|
|
|
|
if (!root) {
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
print_json(root, 2);
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|