Skip to content

Instantly share code, notes, and snippets.

@eddie-chinbat
eddie-chinbat / boostparser.cpp
Created January 6, 2016 08:21
Twitter json file parser using boost spirit library
#include <string>
#include <iostream>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/foreach.hpp>
using namespace std;
using namespace boost::property_tree;
const string jsonfile = "./twitter.json";
/* Below code is only for streamit programming language to get int variables from parsed file. Because Streamit programming language only read int type
@eddie-chinbat
eddie-chinbat / twitterstreaming.cpp
Last active October 18, 2019 00:43
Twitter streaming API example on c++
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <oauth.h>
#include <curl/curl.h>
#include <ncurses.h>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/property_tree/ptree.hpp>