GNUnet  0.18.1
GNUNET_JSON_Specification Struct Reference

Entry in parser specification for GNUNET_JSON_parse(). More...

#include <gnunet_json_lib.h>

Collaboration diagram for GNUNET_JSON_Specification:
[legend]

Data Fields

GNUNET_JSON_Parser parser
 Function for how to parse this type of entry. More...
 
GNUNET_JSON_Cleaner cleaner
 Function for how to clean up this type of entry. More...
 
void * cls
 Closure for parser and cleaner. More...
 
const char * field
 Name of the field to parse, use NULL to get the JSON of the main object instead of the JSON of an individual field. More...
 
void * ptr
 Pointer, details specific to the parser. More...
 
bool * missing
 Pointer to set to true if this argument is indeed missing. More...
 
size_t * size_ptr
 Where should we store the final size of ptr. More...
 
size_t ptr_size
 Number of bytes available in ptr. More...
 
bool is_optional
 Set to true if this component is optional. More...
 

Detailed Description

Entry in parser specification for GNUNET_JSON_parse().

Definition at line 72 of file gnunet_json_lib.h.

Field Documentation

◆ parser

GNUNET_JSON_Parser GNUNET_JSON_Specification::parser

Function for how to parse this type of entry.

Definition at line 77 of file gnunet_json_lib.h.

Referenced by GNUNET_JSON_getopt(), and GNUNET_JSON_parse().

◆ cleaner

GNUNET_JSON_Cleaner GNUNET_JSON_Specification::cleaner

Function for how to clean up this type of entry.

Definition at line 82 of file gnunet_json_lib.h.

Referenced by GNUNET_JSON_getopt().

◆ cls

void* GNUNET_JSON_Specification::cls

Closure for parser and cleaner.

Definition at line 87 of file gnunet_json_lib.h.

Referenced by clean_variable_data(), and GNUNET_JSON_getopt().

◆ field

const char* GNUNET_JSON_Specification::field

Name of the field to parse, use NULL to get the JSON of the main object instead of the JSON of an individual field.

Definition at line 93 of file gnunet_json_lib.h.

Referenced by GNUNET_JSON_parse().

◆ ptr

◆ missing

bool* GNUNET_JSON_Specification::missing

Pointer to set to true if this argument is indeed missing.

Can be NULL.

Definition at line 104 of file gnunet_json_lib.h.

Referenced by GNUNET_JSON_parse().

◆ size_ptr

size_t* GNUNET_JSON_Specification::size_ptr

Where should we store the final size of ptr.

Definition at line 109 of file gnunet_json_lib.h.

Referenced by clean_variable_data().

◆ ptr_size

size_t GNUNET_JSON_Specification::ptr_size

Number of bytes available in ptr.

Definition at line 114 of file gnunet_json_lib.h.

◆ is_optional

bool GNUNET_JSON_Specification::is_optional

Set to true if this component is optional.

Definition at line 119 of file gnunet_json_lib.h.


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