title: looking for deserialization example in boost
body: <p>I'm really not sure how do i go/start for boost deserialization. Below is sample code for which want to know how do the boost deserialization code would be.</p>
  
  <pre><code>#include &lt;boost/serialization/access.hpp&gt;
  #include &lt;boost/serialization/string.hpp&gt;
  #include &lt;boost/serialization/shared_ptr.hpp&gt;
  #include &lt;boost/archive/text_oarchive.hpp&gt;
  #include &lt;boost/smart_ptr/make_shared.hpp&gt;
  
  namespace mydata
  {
      struct MyInfo 
      {
          std::string info = "extra info";
  
          MyInfo(std::string info) : info(std::move(info)) {}
  
          friend class boost::serialization::access;
          template&lt;class Archive&gt;
              void serialize(Archive &amp;ar, const unsigned int /*version*/)
              {
                  ar &amp; info;
              }
      };
  
      struct MyData
      {
          std::string name;
          std::string type;
          boost::shared_ptr&lt;MyInfo&gt; myref;
  
          private:
          friend class boost::serialization::access;
          template&lt;class Archive&gt;
              void serialize(Archive &amp;ar, const unsigned int /*version*/)
              {
                  ar &amp; name;
                  ar &amp; type;
                  ar &amp; myref;
              }
      };
  }
  
  
  
   int main()
      {
  
          using namespace mydata;
          MyData data { "this is a name", "this is a type", boost::make_shared&lt;MyInfo&gt;("this is info") };
  
          boost::archive::text_oarchive oa(std::cout);
          oa &lt;&lt; data;
      }
  </code></pre>
  
  <p>There is also link similar to deserialization but was not clear on
   <a href="https://stackoverflow.com/questions/13089884/boost-deserialize-a-derived-class-to-base-class-pointer">Boost deserialize a derived class to base class pointer</a> .</p>
  
  <p>I really don't know much.. it would really helpful..if i get link on boost deserialization also if there exist.</p>