INGOR
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ytJSON Class Reference

JSON parser. More...

Public Member Functions

ytKeyValuesytJSON_parse (FILE *fp, int opt)
 Parses JSON format data from file stream.
 
ytKeyValuesytJSON_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().
 

Detailed Description

JSON parser.

Member Function Documentation

◆ ytJSON_parse()

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.

Parameters
fpFILE stream.
opt0 or ytJSON_OPT_HYPHEN_BREAK for enabling stopping parsing if a line with only "-" is found.

The documentation for this class was generated from the following files: