Enabling protocol version aware marshalling of values