I need to generate a java array with apache thrift idl. Can someone tell me how can I do that thing?
I have tride it with List.
here the code
struct subscription{
1:list<string> control_data
2:string callback_url
3:bool post_notification
}
Can I do the same thing with an array as It's difficult to deal with a list in my project.
There are only list<T>, set<T> and map<K,V>. What code is generated from that IDL depends on the language. For binary data like byte[] it is recommended to use the binary type instead.
Regarding your particular problem: If it is difficult with list<>, consider converting the data into an array temporarily, while dealing with them in your application logic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With