On 06:33 2010-06-24 -0700, Bryan Duxbury wrote: > Null is not directly supported by Thrift, though I think that some libraries > do their best to do *something*, which sounds like what you're seeing. Maybe > one of the PHP folks could remark as to what's happening? >
As thrift claims to be multilingual, I can't possibly imagine how null would manage in C++. std::string can be "" and that's it, same with int (0) or double (0.0 -- well not completely, as IEEE 754 allows stuff like NaN, but that's not really same thing). There's no way to represent distinction between null and "". What you could do portably, it to wrap value that interests you in a struct with an extra boolean field is_null and store that in map. -- Pozdrawiam, Łukasz P. Michalik
pgpyWg2aHekiQ.pgp
Description: PGP signature
