simplified protobuf serializer