using System.Collections.Generic;
public static void Main()
var obj = JsonConvert.DeserializeObject<RootObject>(json);
foreach (var offer in obj.Reserved.Values.SelectMany(v => v.Values))
Console.WriteLine(offer.effectiveDate);
foreach (var priceDim in offer.priceDimensions.Values)
Console.WriteLine("\t" + priceDim.description);
public Dictionary<string, Dictionary<string, Offer>> Reserved { get; set; }
public string offerTermCode { get; set; }
public string sku { get; set; }
public DateTime effectiveDate { get; set; }
public Dictionary<string, PriceDimension> priceDimensions { get; set; }
public TermAttributes termAttributes { get; set; }
public class PriceDimension
public string rateCode { get; set; }
public string description { get; set; }
public string beginRange { get; set; }
public string endRange { get; set; }
public string unit { get; set; }
public Dictionary<string, string> pricePerUnit { get; set; }
public object[] appliesTo { get; set; }
public class TermAttributes
public string LeaseContractLength { get; set; }
public string OfferingClass { get; set; }
public string PurchaseOption { get; set; }
""DQ578CGN99KG6ECF.HU7G6KETJZ"" : {
""offerTermCode"" : ""HU7G6KETJZ"",
""sku"" : ""DQ578CGN99KG6ECF"",
""effectiveDate"" : ""2017-02-28T23:59:59Z"",
""DQ578CGN99KG6ECF.HU7G6KETJZ.2TG2D8R56U"" : {
""rateCode"" : ""DQ578CGN99KG6ECF.HU7G6KETJZ.2TG2D8R56U"",
""description"" : ""Upfront Fee"",
""DQ578CGN99KG6ECF.HU7G6KETJZ.6YS6EN2CT7"" : {
""rateCode"" : ""DQ578CGN99KG6ECF.HU7G6KETJZ.6YS6EN2CT7"",
""description"" : ""Windows (Amazon VPC), hs1.8xlarge instance-hours used this month"",
""USD"" : ""1.2510000000""
""LeaseContractLength"" : ""1yr"",
""OfferingClass"" : ""standard"",
""PurchaseOption"" : ""Partial Upfront""
""DQ578CGN99KG6ECF.38NPMPTW36"" : {
""offerTermCode"" : ""38NPMPTW36"",
""sku"" : ""DQ578CGN99KG6ECF"",
""effectiveDate"" : ""2015-04-30T23:59:59Z"",
""DQ578CGN99KG6ECF.38NPMPTW36.2TG2D8R56U"" : {
""rateCode"" : ""DQ578CGN99KG6ECF.38NPMPTW36.2TG2D8R56U"",
""description"" : ""Upfront Fee"",
""DQ578CGN99KG6ECF.38NPMPTW36.6YS6EN2CT7"" : {
""rateCode"" : ""DQ578CGN99KG6ECF.38NPMPTW36.6YS6EN2CT7"",
""description"" : ""Windows (Amazon VPC), hs1.8xlarge instance-hours used this month"",
""USD"" : ""1.0910000000""
""LeaseContractLength"" : ""3yr"",
""OfferingClass"" : ""standard"",
""PurchaseOption"" : ""Partial Upfront""
""DQ578CGN99KG6ECF.NQ3QZPMQV9"" : {
""offerTermCode"" : ""NQ3QZPMQV9"",
""sku"" : ""DQ578CGN99KG6ECF"",
""effectiveDate"" : ""2015-04-30T23:59:59Z"",
""DQ578CGN99KG6ECF.NQ3QZPMQV9.6YS6EN2CT7"" : {
""rateCode"" : ""DQ578CGN99KG6ECF.NQ3QZPMQV9.6YS6EN2CT7"",
""description"" : ""USD 0.0 per Windows (Amazon VPC), hs1.8xlarge instance-hour (or partial hour)"",
""USD"" : ""0.0000000000""
""DQ578CGN99KG6ECF.NQ3QZPMQV9.2TG2D8R56U"" : {
""rateCode"" : ""DQ578CGN99KG6ECF.NQ3QZPMQV9.2TG2D8R56U"",
""description"" : ""Upfront Fee"",
""LeaseContractLength"" : ""3yr"",
""OfferingClass"" : ""standard"",
""PurchaseOption"" : ""All Upfront""