2015-08-29 05:09:35 +00:00
|
|
|
/*
|
2015-10-22 05:13:26 +00:00
|
|
|
* Apple // emulator for *ix
|
2015-08-29 05:09:35 +00:00
|
|
|
*
|
|
|
|
* This software package is subject to the GNU General Public License
|
2015-10-22 05:13:26 +00:00
|
|
|
* version 3 or later (your choice) as published by the Free Software
|
2015-08-29 05:09:35 +00:00
|
|
|
* Foundation.
|
|
|
|
*
|
2015-10-22 05:13:26 +00:00
|
|
|
* Copyright 2013-2015 Aaron Culliney
|
2015-08-29 05:09:35 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include "../externals/jsmn/jsmn.h"
|
|
|
|
|
|
|
|
typedef struct JSON_s {
|
|
|
|
char *jsonString;
|
|
|
|
jsmntok_t *jsonTokens;
|
|
|
|
} JSON_s;
|
|
|
|
|
|
|
|
// parses file into string and tokens. returns positive token count or negative jsmnerr_t error code.
|
|
|
|
int json_createFromFile(const char *filePath, INOUT JSON_s *parsedData);
|
|
|
|
|
|
|
|
// destroys internal allocated memory (if any)
|
|
|
|
void json_destroy(JSON_s *parsedData);
|
|
|
|
|