Add toString method to ProtocolNode class

This change is very helpful when using the events and want to print this object or convert it to JSON format.