When I use thrift over the wire - I am using binary protocols - that's much more efficient than JSON (and JSON is not supported for all thrift languages so wornt work for me with a ruby/php/python peers)
My question here is STRICTLY for a use outside of a service, specifically for human-readable config files I assume I can inherit TJSONProtocol and replace the writeFieldBegin method just wondered if I was missing any feature or other issue (of if there is a much better way to do this than use thrift) On Fri, Feb 25, 2011 at 1:57 PM, Chris Morgan <[email protected]> wrote: > On Fri, Feb 25, 2011 at 1:49 PM, Nevo Hed <[email protected]> > wrote: > > Hi All > > > > New user to thrift, planning to use thrift to communicate between > multiple > > components in my system > > but I also was thinking of using a thrift structure to represent my app > > configuration (without a service) > > > > I was hoping to eventually use thrifts binary encoding, by just writing > the > > serialized object to my file > > > > But till I have an console/screen for managing these configs in my app I > was > > hoping to just write-out the config as JSON > > using ThriftJSONString... I was hoping to see text tags in JSON, but I > see > > quoted strings instead > > > > Wanted to see: > > * > > > {"cookie":{"i32":1111638355},"cfgVersion":{"i16":1},"addrBase":{"i32":-1442971648}} > > *But instead I see > > * {"1":{"i32":1111638355},"2":{"i16":1},"3":{"i32":-1442971648}} > > *Which is far less human friendly > > > > Any suggestions? (os thrift just the wrong thing here?) > > > > Thanks! > > -Nevo > > > > In normal use I think it would be much more efficient to send the > parameter indexes rather than the strings themselves. The other end of > the connection is intended to be thrift no? > > Chris > -- Nevo Hed [email protected] 617-302-6175
