json_object_get_string : Get string value of a json object
json_object_get_string() function is used to get the string value of a json object. The syntax char* json_object_get_string(struct json_object *); It takes json_object as a parameter and returns back a string. The following program demonstrates this. the function json_parse accepts a json_object with one or more key:string pairs. #include <json/json.h> #include <stdio.h> void json_parse(json_object * jobj) [...]
json_object_object_foreach : Browse through every json object
You can browse through every json object using the macro json_object_object_foreach The syntax json_object_object_foreach(obj,key,val) where obj is the json object you want to parse, key and value correspond to key: value pairs. As mentioned before, json_object_object_foreach is a macro defined something like this #define json_object_object_foreach(obj,key,val) \ char *key; struct json_object *val; \ for(struct lh_entry *entry [...]
How to install json-glib in Linux (Ubuntu)?
json-glib is a C library for manipulating JSON data in C/C++- for serializing and deserializing JSON data. It can be downloaded from here. But if you are working in Ubuntu or other debian based systems you can execute the following commands $ sudo apt-get install libjson-glib-1.0-0 libjson-glib-1.0-0-dev If you want to debug your programs and [...]
json-c / libjson Tutorial with Examples
JSON is a data inter-exchange format. When compared to XML, it is very lightweight and more human-readable. The Data representation has some what a similar representation like C/C++ structures. It is nowadays very heavily used data format for data transfer in the web. Most languages like PHP have functions to manipulate JSON data. In case [...]
How to Install Json-C in Linux (Ubuntu)?
json-c is a C library for manipulating JSON data in C/C++. It can be downloaded from here. But if you are working in Ubuntu or other debian based systems you can execute the following commands $ sudo apt-get install libjson0 libjson0-dev If you want to debug your programs and see the various steps for debugging, [...]