Data Type Conversion

The following table summarizes legal data type conversions. The symbol X in the following table indicates that a value written into a message as the row type can be extracted as the column type. This table applies to all message values—including map pairs, headers and properties except as noted below.

  bool byte short char int long float double string byte[]
bool X               X  
byte   X X   X X     X  
short     X   X X     X  
char       X         X  
int         X X     X  
long           X     X  
float             X X X  
double               X X  
string X X X   X X X X X  
byte[]                   X
Note:
  • Message properties cannot have byte array values.
  • Values written as strings can be extracted as a numeric or boolean type only when it is possible to parse the string as a number of that type.