thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Duxbury <>
Subject Re: Doubt about map type
Date Wed, 27 Oct 2010 22:02:31 GMT
You can't do this directly, but you can make the value a struct or union
with one field of each type that you want to allow as a value. It's
cumbersome, particularly if you don't have unions fully implemented in your
library, but that's what we've got.

On Wed, Oct 27, 2010 at 2:20 PM, Javier Garcia <> wrote:

> Hello,
> I'm trying to make a .thrift file for a Python application in order to send
> a Python dictionary as a method parameter.
> I can define a map where the types of the key and value are fixed:
> map <string key, string value> name
> But I need a map where the value type is variable. The key is always a
> string but the value might be a string, integer or another dictionary
> Is it possible in thrift?
> Thanks in advance

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