YAJL 2.0.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
long long yajl_val_s::i
const char** yajl_val_s::keys
struct { ... } yajl_val_s::number
struct { ... } yajl_val_s::object

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

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

union { ... } yajl_val_s::u

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