here's an easy way to do it.
import demjson,urllib2
def getOptionChain():
url='http://www.google.com/finance/option_chain?q=AAPL&output=json'
ii=urllib.urlopen(url).readline()
ii = demjson.decode(ii)
you could wrap this in c++ and then execute a python interpreter to run...