json - Coding example for thrift in C, using files -


i've started using thrift c. managed generated .c , .h files via compiler. i'm looking write file, preferably json. there no examples on apache thrift site. internet search turns next nothing useful. have sample code can use? have struct has bunch of ints , char *.

however there no examples on apache thrift site. internet search turns next nothing useful.

that's not true, have great tutorial covering great part of languages. can find them quite via google. tutorial code can found in release tarball or in git repository top-level directory named tutorial.

since looking json, recommend have @ cross-language test client/server, can found under test or lib (a bit inconsistent right now, cleaning up). afaik plain c there no json available, c++ there is.

in order store things file, choose stream or file transport , protocol of choice available protocols. it's simple (pseudocode)

var data = initializemydatastructure();  var trans = new tfiletransport("myfile"); var prot = new tjsonprotocol(trans);  data.write(prot); 

the support plain c limited yet, there kinds of transports/protocols c++.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -