nlib
nn::nlib::msgpack::JsonStreamParser::Token Struct Reference

Stores data on the tokens obtained by the parser. More...

#include <manual_en.h>

Public Attributes

Event event
 The event returned by Next().
 
nlib_utf8_tbuf
 Stores strings or binary data. More...
 
union {
number
 The union to store numeric data. The data member to be used differs depending on the event. More...
 
bool token_toobig
 When the event is kEventString and the token is too large, stores a non-zero value. In this case, a null string is set to buf.
 
int8_t ext
 When the event is kEventExt, stores a data type 8-bit value.
 

Detailed Description

Stores data on the tokens obtained by the parser.

Definition at line 125 of file JsonStreamParser.h.

Member Data Documentation

◆ buf

nn::nlib::msgpack::JsonStreamParser::Token::buf

Stores strings or binary data.

Description
Event Description
kEventString Stores a null-terminated string.
kEventKeyName Stores a null-terminated string.
kEventBinary Stores binary data.
kEventExt Stores binary data.

Definition at line 127 of file JsonStreamParser.h.

◆ number

nn::nlib::msgpack::JsonStreamParser::Token::number

The union to store numeric data. The data member to be used differs depending on the event.

Description
Event Data member Description
kEventString size Stores the string length.
kEventKeyName size Stores the string length.
kEventBinary size Stores the binary data size.
kEventExt size Stores the binary data size.
kEventNumberInt64 i64 Stores a number.
kEventNumberUint64 u64 Stores a number.
kEventNumberDouble f64 Stores a number.
kEventNumberInt32 i32 Stores a number.
kEventNumberUint32 u32 Stores a number.
kEventNumberFloat f32 Stores a number.

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