MACSio  0.9
Multi-purpose, Application-Centric, Scalable I/O Proxy App
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

Functions

struct json_objectjson_object_new_boolean (json_bool b)
 
json_bool json_object_get_boolean (struct json_object *obj)
 

Detailed Description

Function Documentation

struct json_object * json_object_new_boolean ( json_bool  b)

Create a new empty json_object of type json_type_boolean

Parameters
ba json_bool TRUE or FALSE (0 or 1)
Returns
a json_object of type json_type_boolean

Definition at line 458 of file json_object.c.

json_bool json_object_get_boolean ( struct json_object obj)

Get the json_bool value of a json_object

The type is coerced to a json_bool if the passed object is not a json_bool. integer and double objects will return FALSE if there value is zero or TRUE otherwise. If the passed object is a string it will return TRUE if it has a non zero length. If any other object type is passed TRUE will be returned if the object is not NULL.

Parameters
objthe json_object instance
Returns
a json_bool

Definition at line 467 of file json_object.c.