5

Possible Duplicate:
Binary serialization/de-serialization in C++ and C#

I am working on a project where server is written in C++ (boost is extensively used) and the client application is written in C#. I am facing the problem while serializing/deserializing messages between client/server.

I have studied various alternative libraries for achieving this sort of cross-platform serialization, and Protocol Buffers seems to be the best... but it does not support serialization of the standard library's map container and boost::shared_ptr.

My question then, is:

  • Can someone explain how map and boost::shared_ptr could be serialized using Protocol Buffers. Or failing that,
  • Would Apache's Thrift work for this?
  • ...Or am I stuck using interop DLLs on the (C#) client side?
Community
  • 1
  • 1
user587469
  • 51
  • 1
  • @jgauffin: NOT a duplicate (of that question at least), since this user is explicitly ruling out protocol buffers. – Shog9 Jan 25 '11 at 18:03
  • I don't see how any implementation would serialize a `boost::shared_ptr`. – jgauffin Jan 25 '11 at 18:59

1 Answers1

2

What about wrapping the c++ message classes with c++/cli ref classes so that you use the same boost serialisation library on the client side.

T33C
  • 4,341
  • 2
  • 20
  • 42