Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
UBJVal Struct Reference

Detailed Description

UBJParser Value (passed into the parser callback interface UBJPIntf)

#include <ubjson.h>

Public Attributes

union {
   U8   uint8
 Use when 't' is UBJT_Uint8 or UBJT_Boolean. More...
 
   S8   int8
 Use when 't' is UBJT_Int8. More...
 
   char   ch
 Use when 't' is UBJT_Char. More...
 
   S16   int16
 Use when 't' is UBJT_Int16. More...
 
   S32   int32
 Use when 't' is UBJT_Int32. More...
 
   S64   int64
 Use when 't' is UBJT_Int64. More...
 
   double   float64
 Use when 't' is UBJT_Float64. More...
 
   float   float32
 Use when 't' is UBJT_Float32. More...
 
   const char *   string
 Borrowed chunk for String/HNumber; not NUL-terminated. More...
 
} u
 The value type is controlled by type (t) More...
 
S32 len
 When t=UBJT_Count: container len, When t=UBJT_String: string chunk len. More...
 
S32 x
 When t=UBJT_Count: type UBJT. More...
 
char * name
 Object member name: set when parent is an object. More...
 
U8 t
 UBJSON Type, t is set to one of the types in UBJT. More...
 

Member Data Documentation

◆ ch

char UBJVal::ch

Use when 't' is UBJT_Char.

◆ float32

float UBJVal::float32

Use when 't' is UBJT_Float32.

◆ float64

double UBJVal::float64

Use when 't' is UBJT_Float64.

◆ int16

S16 UBJVal::int16

Use when 't' is UBJT_Int16.

◆ int32

S32 UBJVal::int32

Use when 't' is UBJT_Int32.

◆ int64

S64 UBJVal::int64

Use when 't' is UBJT_Int64.

◆ int8

S8 UBJVal::int8

Use when 't' is UBJT_Int8.

◆ len

S32 UBJVal::len

When t=UBJT_Count: container len, When t=UBJT_String: string chunk len.

◆ name

char* UBJVal::name

Object member name: set when parent is an object.

◆ string

const char* UBJVal::string

Borrowed chunk for String/HNumber; not NUL-terminated.

Use len and x.

◆ t

U8 UBJVal::t

UBJSON Type, t is set to one of the types in UBJT.

◆ 

union { ... } UBJVal::u

The value type is controlled by type (t)

◆ uint8

U8 UBJVal::uint8

Use when 't' is UBJT_Uint8 or UBJT_Boolean.

◆ x

S32 UBJVal::x

When t=UBJT_Count: type UBJT.

When t=UBJT_String: remaining string length