Types (structs, unions and typedefs)

type sfparse_vec

sfparse_vec stores sequence of bytes.

uint8_t *base

base points to the beginning of the sequence of bytes.

size_t len

len is the number of bytes contained in this sequence.

type sfparse_decimal

sfparse_decimal contains decimal value.

int64_t numer

numer contains numerator of the decimal value.

int64_t denom

denom contains denominator of the decimal value.

type sfparse_value

sfparse_value stores a Structured Field item. For Inner List, only type is set to sfparse_type.SFPARSE_TYPE_INNER_LIST. In order to read the items contained in an inner list, call sfparse_parser_inner_list().

sfparse_type type

type is the type of the value contained in this particular object.

uint32_t flags

flags is bitwise OR of one or more of SFPARSE_VALUE_FLAG_*.

union [anonymous]
int boolean

boolean contains boolean value if type == sfparse_type.SFPARSE_TYPE_BOOLEAN. 1 indicates true, and 0 indicates false.

int64_t integer

integer contains integer value if type is either sfparse_type.SFPARSE_TYPE_INTEGER or sfparse_type.SFPARSE_TYPE_DATE.

sfparse_decimal decimal

decimal contains decimal value if type == sfparse_type.SFPARSE_TYPE_DECIMAL.

sfparse_vec vec

vec contains sequence of bytes if type is either sfparse_type.SFPARSE_TYPE_STRING, sfparse_type.SFPARSE_TYPE_TOKEN, sfparse_type.SFPARSE_TYPE_BYTESEQ, or sfparse_type.SFPARSE_TYPE_DISPSTRING.

For sfparse_type.SFPARSE_TYPE_STRING, this field contains one or more escaped characters if flags has SFPARSE_VALUE_FLAG_ESCAPED_STRING set. To unescape the string, use sfparse_unescape().

For sfparse_type.SFPARSE_TYPE_BYTESEQ, this field contains base64 encoded string. To decode this byte string, use sfparse_base64decode().

For sfparse_type.SFPARSE_TYPE_DISPSTRING, this field may contain percent-encoded UTF-8 byte sequences. To decode it, use sfparse_pctdecode().

If vec.len == 0, vec.base is guaranteed to be NULL.

type sfparse_parser

sfparse_parser is the Structured Field Values parser. Use sfparse_parser_init() to initialize it.