thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Abernethy <>
Subject Re: More granular specification of data?
Date Fri, 13 Nov 2015 23:59:53 GMT
Hey Todd,

Design by contract! Would be a nice thing but no such beast in the thrift
abstraction (though someone or some language may have some bits, never seen
Thrift for Eiffel ...).


On Fri, Nov 13, 2015 at 3:37 PM, Todd O'Bryan <> wrote:

> Hey all,
> Thrift looks really cool, but I'm wondering if it can handle a use case.
> Is there any way to specify more specific constraints on data? For example,
> say you knew that userId was a string between 8 and 24 characters. Is there
> any way to specify that in the data representation? Other examples would be
> regexes for strings, or ranges for integers, etc.
> I'm guessing this would be really hard to do cross-linguistically, but it
> would be really nice to be able to provide clients with code that would
> validate their messages before they send them.
> Looking around, all I've seen that does this kind of thing are XML Schema
> and JSON Schema, and, of course, nobody wants to deal with XML and JSON if
> they can avoid it. :-)
> Thanks,
> Todd

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