GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Data Fields
gp_json_val Struct Reference

A parsed JSON key value pair. More...

#include <gp_json_reader.h>

Data Fields

enum gp_json_type type
 A value type.
 
char * buf
 
size_t idx
 
union { 
 
   int   val_bool 
 A boolean value.
 
   long long   val_int 
 An integer value.
 
   const char *   val_str 
 A string value.
 
};  
 
double val_float
 A floating point value.
 
char id [64]
 An ID for object values.
 

Detailed Description

A parsed JSON key value pair.

Definition at line 68 of file gp_json_reader.h.

Field Documentation

◆ [union]

union { ... } gp_json_val

An union to store the parsed value into.

◆ buf

char* gp_json_val::buf

An user supplied buffer and size to store a string values to.

Definition at line 77 of file gp_json_reader.h.

◆ idx

size_t gp_json_val::idx

An index to attribute list.

This is set by the gp_json_obj_first_filter() and gp_json_obj_next_filter() functions.

Definition at line 86 of file gp_json_reader.h.

◆ type

enum gp_json_type gp_json_val::type

A value type.

GP_JSON_VALUE_VOID means that no value was parsed.

Definition at line 74 of file gp_json_reader.h.

Referenced by gp_json_val_valid().

◆ val_float

double gp_json_val::val_float

A floating point value.

Since integer values are subset of floating point values val_float is always set when val_int was set.

Definition at line 104 of file gp_json_reader.h.


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