title: How to serialize this class into XML or JSON
body: <p>I have a list of objects derived from a class named "Campus" which contains two strings, one int and two lists : one for "Students", the other is for "Teachers", before closing the program, I want to save the campus objects and of course the "Student" and "Teachers" objects contained on their lists, I want to serialize those data in an XML or JSON format or even anything else then store the result in a file.</p>
  
  <p>Can somebody give me the fastest way to do the serialization with a library (that is not heavy as boost) in XML or JSON or another solution. When it comes to deal with JSON or XML serialization, I don't know what to do !
  EDIT: is this feasible with RapidJSON ?</p>
  
  <pre><code>class Campus
  {
  private:
      std::string city;
      std::string region;
      int capacity;
      std::list&lt;Student&gt; students;
      std::list&lt;Teacher&gt; teachers;
  }
  
  class Student
  {
  private:
      int ID;
      std::string name;
      std::string surname;
  }
  
  class Teacher
  {
  protected:
      int ID;
      std::string name;
      std::string surname;
  };
  </code></pre>