MACSio  0.9
Multi-purpose, Application-Centric, Scalable I/O Proxy App
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
json_util.h File Reference
#include "json_object.h"

Go to the source code of this file.

Macros

#define JSON_FILE_BUF_SIZE   4096
 

Functions

struct json_objectjson_object_from_file (const char *filename)
 
int json_object_to_file (const char *filename, struct json_object *obj)
 
int json_object_to_file_ext (const char *filename, struct json_object *obj, int flags)
 
int json_parse_int64 (const char *buf, int64_t *retval)
 
int json_parse_double (const char *buf, double *retval)
 
const char * json_type_to_name (enum json_type o_type)
 
const char * json_extarr_type_to_name (enum json_extarr_type o_type)
 
int json_extarr_type_nbits (enum json_extarr_type o_type)
 
int json_extarr_type_nbytes (enum json_extarr_type o_type)
 

Macro Definition Documentation

#define JSON_FILE_BUF_SIZE   4096

Definition at line 21 of file json_util.h.

Function Documentation

struct json_object* json_object_from_file ( const char *  filename)

Definition at line 68 of file json_util.c.

int json_object_to_file ( const char *  filename,
struct json_object obj 
)

Definition at line 144 of file json_util.c.

int json_object_to_file_ext ( const char *  filename,
struct json_object obj,
int  flags 
)

Definition at line 102 of file json_util.c.

int json_parse_int64 ( const char *  buf,
int64_t *  retval 
)

If the sign is different, or some of the digits are different, or there is another digit present in the original string then we have NOT successfully parsed the value.

Definition at line 188 of file json_util.c.

int json_parse_double ( const char *  buf,
double *  retval 
)

Definition at line 149 of file json_util.c.

const char* json_type_to_name ( enum json_type  o_type)

Return a string describing the type of the object. e.g. "int", or "object", etc...

Definition at line 308 of file json_util.c.

const char* json_extarr_type_to_name ( enum json_extarr_type  o_type)

Definition at line 330 of file json_util.c.

int json_extarr_type_nbits ( enum json_extarr_type  o_type)

Definition at line 341 of file json_util.c.

int json_extarr_type_nbytes ( enum json_extarr_type  o_type)

Definition at line 356 of file json_util.c.