0

json_object_get_string : Get string value of a json object

Posted by Joys of Programming on May 25, 2010 in C/C++, JSON, json-c

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) [...]

Tags: , , , ,

 
0

json_object_object_foreach : Browse through every json object

Posted by Joys of Programming on May 24, 2010 in C/C++, JSON, Web, json-c

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 [...]

Tags: , , , ,

 
0

How to install json-glib in Linux (Ubuntu)?

Posted by Joys of Programming on May 20, 2010 in C/C++, Web, json-c

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 [...]

Tags: , ,

 
0

json-c / libjson Tutorial with Examples

Posted by Joys of Programming on May 20, 2010 in C/C++, json-c

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 [...]

Tags: , , ,

 
0

How to Install Json-C in Linux (Ubuntu)?

Posted by Joys of Programming on May 20, 2010 in C/C++, Linux, Web, json-c

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, [...]

Tags: , , ,

Copyright © 2009-2010 Joys of Programming All rights reserved.
Desk Mess Mirrored v1.7.2 theme from BuyNowShop.com.