Apache thrift: How to assign null as default value? -


how assign default value null in apache thrift interface definition language? tried following, throw fileparseexception.

struct user {     1: string name,     2: optional string description = "",     3: optional string address = null    //doesn't work.  } 

since used optional, use iiset_xxx flags see if particular value set.

in (all?) languages initial field value default, unset value, target languages' equivalent of empty (or null) string anyway. no need set again.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -