thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chet Murthy <murthy.c...@gmail.com>
Subject Re: "thrift-nicejson": A nicer JSON format for Thrift (now with protocol stack support) release 0.001
Date Mon, 27 Nov 2017 23:03:35 GMT
>
>
>        https://github.com/chetmurthy/thrift-nicejson
>
>
Arrgh.  I should have added that one of the things this library provides,
is the ability to demarshal any Thrift data, whether in-flight or at-rest,
into JSON.  So a generic tool can be written (and there's an example in the
repo) that can disassemble a TBinaryProtocol file, given the "typelib"
(corresponds to the IDL file) and "type" of the message.  E.g.

   % THRIFT_TYPELIB_PATH=../../test/cpp/gen-typelib
./dump-binary-serialized  --typelib apache.thrift.plugin.plugin --type
GeneratorInput --input-file
../../test/cpp/gen-typelib/tutorial.tutorial.binary_typelib
... JSON output elided .....


The tool ("dump-binary-serialized") is given a path of directories in which
to find type-libraries, the name of the typelib of interest, the type
inside that typelib, and the file containing serialized data.  The argumens
are *clearly* too voluminous, but at this point, we're talking about
*naming*, and for instance, one could imagine a global directory wherein
the type would specified as "apache.thrift.plugin.GeneratorInput" or
something like that.  And of course, if the binary-serialization included
as its first bit a string with that type, it'd get even simpler.  Or
perhaps a UUID?

The reason why I mention all of this, is in hopes that somebody out there
would be interested in having this conversation and design discussion.

Thanks, and sorry for the noise,
--chet--

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message