VSF Documented
Macros | Functions
vsf_json.c File Reference
#include "service/vsf_service_cfg.h"
#include "./vsf_json.h"
#include <stdio.h>

Macros

#define __VSF_JSON_CLASS_IMPLEMENT
 

Functions

vsf_json_type_t vsf_json_get_type (const char *json)
 
vsf_json_type_t vsf_json_enumerate_start (vsf_json_enumerator_t *e, const char *json)
 
char * vsf_json_enumerate_next (vsf_json_enumerator_t *e)
 
int vsf_json_num_of_entry (const char *json)
 
char * vsf_json_get (const char *json, const char *key)
 
int vsf_json_get_string (const char *json, char *result, int len)
 
int vsf_json_get_number (const char *json, double *result)
 
int vsf_json_get_boolean (const char *json, bool *result)
 
void vsf_json_constructor_init (vsf_json_constructor_t *c, void *param, int(*write_str)(void *, char *, int))
 
int vsf_json_write_str (vsf_json_constructor_t *c, char *buf, int len)
 
int vsf_json_set_key (vsf_json_constructor_t *c, char *key)
 
int vsf_json_set_string (vsf_json_constructor_t *c, char *key, char *value)
 
int vsf_json_set_integer (vsf_json_constructor_t *c, char *key, int value)
 
int vsf_json_set_double (vsf_json_constructor_t *c, char *key, double value)
 
int vsf_json_set_boolean (vsf_json_constructor_t *c, char *key, bool value)
 
int vsf_json_set_null (vsf_json_constructor_t *c, char *key)
 
int vsf_json_constructor_buffer_write_str (void *param, char *str, int len)
 

Macro Definition Documentation

◆ __VSF_JSON_CLASS_IMPLEMENT

#define __VSF_JSON_CLASS_IMPLEMENT

Function Documentation

◆ vsf_json_get_type()

vsf_json_type_t vsf_json_get_type ( const char *  json)

◆ vsf_json_enumerate_start()

vsf_json_type_t vsf_json_enumerate_start ( vsf_json_enumerator_t e,
const char *  json 
)

◆ vsf_json_enumerate_next()

char * vsf_json_enumerate_next ( vsf_json_enumerator_t e)

◆ vsf_json_num_of_entry()

int vsf_json_num_of_entry ( const char *  json)

◆ vsf_json_get()

char * vsf_json_get ( const char *  json,
const char *  key 
)

◆ vsf_json_get_string()

int vsf_json_get_string ( const char *  json,
char *  result,
int  len 
)

◆ vsf_json_get_number()

int vsf_json_get_number ( const char *  json,
double *  result 
)

◆ vsf_json_get_boolean()

int vsf_json_get_boolean ( const char *  json,
bool result 
)

◆ vsf_json_constructor_init()

void vsf_json_constructor_init ( vsf_json_constructor_t c,
void *  param,
int(*)(void *, char *, int)  write_str 
)

◆ vsf_json_write_str()

int vsf_json_write_str ( vsf_json_constructor_t c,
char *  buf,
int  len 
)

◆ vsf_json_set_key()

int vsf_json_set_key ( vsf_json_constructor_t c,
char *  key 
)

◆ vsf_json_set_string()

int vsf_json_set_string ( vsf_json_constructor_t c,
char *  key,
char *  value 
)

◆ vsf_json_set_integer()

int vsf_json_set_integer ( vsf_json_constructor_t c,
char *  key,
int  value 
)

◆ vsf_json_set_double()

int vsf_json_set_double ( vsf_json_constructor_t c,
char *  key,
double  value 
)

◆ vsf_json_set_boolean()

int vsf_json_set_boolean ( vsf_json_constructor_t c,
char *  key,
bool  value 
)

◆ vsf_json_set_null()

int vsf_json_set_null ( vsf_json_constructor_t c,
char *  key 
)

◆ vsf_json_constructor_buffer_write_str()

int vsf_json_constructor_buffer_write_str ( void *  param,
char *  str,
int  len 
)