INGOR
|
JSON parser. More...
Public Member Functions | |
ytKeyValues * | ytJSON_parse (FILE *fp, int opt) |
Parses JSON format data from file stream. | |
ytKeyValues * | ytJSON_parseStr (const char *str) |
Parses JSON format data from a string. | |
#define | ytJSON_OPT_HYPHEN_BREAK 0x00000001 |
Option for ytJSON_parse(). | |
#define | ytJSON_OPT_FORMAT 0x00000001 |
Option for ytJSON_print(). | |
JSON parser.
ytKeyValues * ytJSON_parse | ( | FILE * | fp, |
int | opt | ||
) |
Parses JSON format data from file stream.
An array is converted to an instance of ytArray. Any numerical value is converted to a double precision floating point value.
Some optional settings can be accepted. Currently, only ytJSON_OPT_HYPHEN_BREAK is suppoted.
fp | FILE stream. |
opt | 0 or ytJSON_OPT_HYPHEN_BREAK for enabling stopping parsing if a line with only "- " is found. |