title: How to set a subset of properties of an object using data obtained from web (in form of JSON) using DataContractJsonSerializer
body: <p>I am making a Travel app project consisting of a backend coded in PHP and a UWP app (frontend) coded in C#.</p>
  
  <p>Following represent the "Holiday Package" class implemented in C#</p>
  
  <pre><code> public class Packages
  {
      public string PackageID { get; set; }
      public string Name { get; set; }
      public string Destination { get; set; }
      public string Description { get; set; }
      public int Duration { get; set; }
      public float BasePrice { get; set; }
      public List&lt;string&gt; Images { get; set; }
  
      public HotelInPackage Hotel { get; set; }
  
      public string TransportType { get; set; }
  
      public Packages(string packageID,string name,string destination,string description,int duration,float basePrice,List&lt;string&gt; images)
      {
          PackageID = packageID;
          Name = name;
          Destination = destination;
          Description = description;
          Duration = duration;
          BasePrice = basePrice;
          Images = images;
      }
  
      public void HotelConstruct(string hotelID,string name,int cat)
      {
          Hotel = new HotelInPackage(hotelID, name, cat);
      }
  
      public void SetTransport(string transportType)
      {
          TransportType = transportType;
      }
  
      public void ChangeImageName()
      {
          int i = 0;
          while(i&lt;Images.Count)
          {
              Images[i] = string.Format("Assets/CitiesPlaceholder/{0}.jpg",Images[i]);
              i++;
          }
      }
  }
  </code></pre>
  
  <p>Following is the JSON string returned by the backend</p>
  
  <pre><code>{
  "PackageID":"P280",
  "Name":"Sigapore Dreams",
  "Destination":"Singapore",
  "Description":"lorem ipsum,dolor sit amet",
  "Duration":5,
  "BasePrice":999.2
  }
  </code></pre>
  
  <p>I want to deserialize the above JSON string into the "Packages" class thereby setting its "PackageID", "Name", "Destination", "Description", "Duration" and "BasePrice" properties i.e. I  want to set only a subset of properties using web data</p>
  
  <p>How to implement the above solution using the DataContractJsonSerializer class?</p>
  
  <p>Do I need to Add/Modify any Constructor?</p>