YAJL  2.1.0
Data Fields
yajl_val_s Struct Reference

#include <yajl_tree.h>

Data Fields

yajl_type type
 
union {
   char *   string
 
   struct {
      long long   i
 
      double   d
 
      char *   r
 
      unsigned int   flags
 
   }   number
 
   struct {
      const char **   keys
 
      yajl_val *   values
 
      size_t   len
 
   }   object
 
   struct {
      yajl_val *   values
 
      size_t   len
 
   }   array
 
u
 

Detailed Description

A JSON value representation capable of holding one of the seven types above. For "string", "number", "object", and "array" additional data is available in the union. The "YAJL_IS_*" and "YAJL_GET_*" macros below allow type checking and convenient value extraction.

Examples:
example/parse_config.c.

Field Documentation

struct { ... } yajl_val_s::array
double yajl_val_s::d
unsigned int yajl_val_s::flags

Signals whether the i and d members are valid. See YAJL_NUMBER_INT_VALID and YAJL_NUMBER_DOUBLE_VALID.

long long yajl_val_s::i
const char** yajl_val_s::keys
size_t yajl_val_s::len
struct { ... } yajl_val_s::number
struct { ... } yajl_val_s::object
char* yajl_val_s::r
char* yajl_val_s::string
yajl_type yajl_val_s::type

Type of the value contained. Use the "YAJL_IS_*" macros to check for a specific type.

union { ... } yajl_val_s::u

Type-specific data. You may use the "YAJL_GET_*" macros to access these members.

yajl_val* yajl_val_s::values

The documentation for this struct was generated from the following file: