using System.Collections.Generic;
public static void Main()
""Superior Suite Long Stay Offer - test"": {
""url"": ""https://hoteltest.cosmores.com/?CHECK_IN_DATE=2017-08-20&CHECK_OUT_DATE=2017-08-31&PERSONS=2&ROOMS=3924&CURRENCY=EUR&ref=tripads"",
""taxes_at_checkout"": 0,
""CREDIT_CARDS_ACCEPTED""
""marketing_text"": ""--MANOS-OFFER--"",
""price"": 251.838154361,
""taxes"": 34.1618456391,
""taxes_at_checkout"": 0,
""Superior Double Room Long Stay Offer - test"": {
""url"": ""https://hoteltest.cosmores.com/?CHECK_IN_DATE=2017-08-20&CHECK_OUT_DATE=2017-08-31&PERSONS=2&ROOMS=5385&CURRENCY=EUR&ref=tripads"",
""taxes_at_checkout"": 0,
""CREDIT_CARDS_ACCEPTED""
""marketing_text"": ""--MANOS-OFFER--"",
""taxes"": 24.5965288601,
""taxes_at_checkout"": 0,
""Superior Double with Sea View Long Stay Offer - test"": {
""url"": ""https://hoteltest.cosmores.com/?CHECK_IN_DATE=2017-08-20&CHECK_OUT_DATE=2017-08-31&PERSONS=2&ROOMS=5386&CURRENCY=EUR&ref=tripads"",
""taxes_at_checkout"": 0,
""CREDIT_CARDS_ACCEPTED""
""marketing_text"": ""--MANOS-OFFER--"",
""price"": 151.102892617,
""taxes"": 20.4971073834,
""taxes_at_checkout"": 0,
var rro = JsonConvert.DeserializeObject<RatesResponseObject>(json);
foreach (Hotel hotel in rro.hotels)
Console.WriteLine("Hotel ID: " + hotel.hotel_id);
foreach (var kvp in hotel.room_types)
Console.WriteLine("Room Type: " + kvp.Key);
Console.WriteLine("Number of Rooms: " + kvp.Value.num_rooms);
Console.WriteLine("Final Price: " + kvp.Value.final_price);
public class RatesResponseObject
public List<Hotel> hotels { get; set; }
public int hotel_id { get; set; }
public Dictionary<string, RoomType> room_types { get; set; }
public string url { get; set; }
public decimal price { get; set; }
public decimal fees { get; set; }
public decimal fees_at_checkout { get; set; }
public decimal taxes { get; set; }
public decimal taxes_at_checkout { get; set; }
public decimal final_price { get; set; }
public int num_rooms { get; set; }
public string currency { get; set; }
public List<string> room_amenities { get; set; }
public List<Discount> discounts { get; set; }
public string marketing_text { get; set; }
public bool is_percent { get; set; }
public decimal amount { get; set; }
public decimal price { get; set; }
public decimal fees { get; set; }
public decimal fees_at_checkout { get; set; }
public decimal taxes { get; set; }
public decimal taxes_at_checkout { get; set; }
public decimal final_price { get; set; }