hello sir,
I want to know how to retrieve data in json format with "@" prefix, below is the json I retrieved
{"@averageBaseRate":"574.27","@averageRate":"430.7","@commissionableUsdTotal":"430.7","@currencyCode":"USD","@maxNightlyRate":"430.7","@nightlyRateTotal":"430.7","@surchargeTotal":"76.23","@total":"506.93"
this is the way i retrieve value but I get null value .Element without @ prefix are retrieved properly
foreach (var a in root.HotelRoomAvailabilityResponse.HotelRoomResponse)
{
string average = a.RateInfos.RateInfo.ChargeableRateInfo.@averageRate;
}
below is my class that I used
public class RootObject
{
public HotelRoomAvailabilityResponse HotelRoomAvailabilityResponse { get; set; }
}
public class HotelRoomAvailabilityResponse
{
public dynamic HotelRoomResponse { get; set; }
}
public class HotelRoomResponse
{
public RoomImages RoomImages { get; set; }
}
public class RateInfos
{
public string @size { get; set; }
public RateInfo RateInfo { get; set; }
}
public class RateInfo
{
public ChargeableRateInfo ChargeableRateInfo { get; set; }
}
public class ChargeableRateInfo
{
public string @averageRate { get; set; }
}