Using something like Google's Protocol Buffers or a similar system where you generate a standard serialization backend for all the plain old data types you want to send across the network is way less of a pain in the ass.
If you're concerned about the overhead, look at MsgPack or Cap'n Proto - plenty of ways to shave the yak out there without needing to roll your own.