No, it won't work. You need to write out your class/struct each simple data type at a time, and then read it back exactly the same -- just like I did with everything else in that file.
You'd have to do exact same thing with OnSerializeNetworkView.
I recommend just using RFC calls instead. If your struct contains an int, a bool, and a string, your RFC would look like:
[RFC] void MyFunc (int a, bool b, string c) { ... }