You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by shubham jain <sh...@gmail.com> on 2017/10/05 21:42:50 UTC

Can thriftrw be used for creating Thrift IDL?

I wanted to write Thift IDL files automatically in Node js. For doing that,
I am thinking to use thriftrw node js package from here:-
https://github.com/thriftrw/thriftrw-node

Actually, my complete task is to convert the given JSON schema to Thrift
IDL Schema. For doing this whole task, I am planning to first parse JSON
Schema. From this JSON Schema Object, I would create a thriftrw object from
which I would create Thrift IDL Schema file. But I am not getting how can I
convert thriftrw object to Thrift IDL schema?

Please provide some suggestions.

-- 
Regards,
Shubham Jain

Re: Can thriftrw be used for creating Thrift IDL?

Posted by Robert Lu <ro...@gmail.com>.
Hi,

Personally, thriftrw is a library encode, decode object via IDL.
compare with apache thrift, it doesn't need compile.

I think, you can use library to decode, encode RPC object via your json.
the IDL as the middle result of your json to decode/encode behavior. I
don't think it's IDL was designed for.


On Fri, Oct 6, 2017 at 5:42 AM, shubham jain <sh...@gmail.com> wrote:

> I wanted to write Thift IDL files automatically in Node js. For doing that,
> I am thinking to use thriftrw node js package from here:-
> https://github.com/thriftrw/thriftrw-node
>
> Actually, my complete task is to convert the given JSON schema to Thrift
> IDL Schema. For doing this whole task, I am planning to first parse JSON
> Schema. From this JSON Schema Object, I would create a thriftrw object from
> which I would create Thrift IDL Schema file. But I am not getting how can I
> convert thriftrw object to Thrift IDL schema?
>
> Please provide some suggestions.
>
> --
> Regards,
> Shubham Jain
>



-- 
Robert Lu <ro...@gmail.com>
About me: http://about.me/RobberPhex