http://stackoverflow.com/q/38266393/10263

CSharp · Console

/Program.cs

using System;
using System.Collections.Generic;
using Newtonsoft.Json;
					
public class Program
{
	public static void Main()
	{
		string json = @"
            {
              ""success"": true,
              ""more"": false,
              ""results_html"": ""a lot of html in here"",
              ""listinginfo"": {
                ""637640274112277168"": {
                  ""listingid"": ""637640274112277168"",
                  ""price"": 50,
                  ""fee"": 7,
                  ""publisher_fee_app"": 730,
                  ""publisher_fee_percent"": ""0.10000000149011612"",
                  ""currencyid"": ""2005"",
                  ""steam_fee"": 2,
                  ""publisher_fee"": 5,
                  ""converted_price"": 1,
                  ""converted_fee"": 2,
                  ""converted_currencyid"": ""2003"",
                  ""converted_steam_fee"": 1,
                  ""converted_publisher_fee"": 1,
                  ""converted_price_per_unit"": 1,
                  ""converted_fee_per_unit"": 2,
                  ""converted_steam_fee_per_unit"": 1,
                  ""converted_publisher_fee_per_unit"": 1,
                  ""asset"": {
                    ""currency"": 0,
                    ""appid"": 730,
                    ""contextid"": ""2"",
                    ""id"": ""6542776191"",
                    ""amount"": ""1""
                  }
                },
                ""194035710805671301"": {
                  ""listingid"": ""194035710805671301"",
                  ""price"": 0,
                  ""fee"": 0,
                  ""publisher_fee_app"": 730,
                  ""publisher_fee_percent"": ""0.10000000149011612"",
                  ""currencyid"": ""2001"",
                  ""asset"": {
                    ""currency"": 0,
                    ""appid"": 730,
                    ""contextid"": ""2"",
                    ""id"": ""6825071309"",
                    ""amount"": ""0""
                  }
                }
              }
            }";
		
		ListingResponse response = JsonConvert.DeserializeObject<ListingResponse>(json);
		
		foreach (var kvp in response.listinginfo)
		{
			var item = kvp.Value;
			Console.WriteLine("listingid: " + item.listingid);
			Console.WriteLine("price: " + item.price);
			Console.WriteLine("fee: " + item.fee);
			Console.WriteLine("publisher fee app: " + item.publisher_fee_app);
			Console.WriteLine("publisher fee percent: " + item.publisher_fee_percent);
			Console.WriteLine("steam_fee: " + item.steam_fee);
			Console.WriteLine("publisher fee: " + item.publisher_fee);
			Console.WriteLine("converted price: " + item.converted_price);
			Console.WriteLine("converted fee: " + item.converted_fee);
			Console.WriteLine("converted currencyid: " + item.converted_currencyid);
			Console.WriteLine("converted steam fee: " + item.converted_steam_fee);
			Console.WriteLine("converted publisher fee: " + item.converted_publisher_fee);
			Console.WriteLine("converted fee per unit: " + item.converted_fee_per_unit);
			Console.WriteLine("converted steam fee per unit: " + item.converted_steam_fee_per_unit);
			Console.WriteLine("converted publisher fee per unit: " + item.converted_publisher_fee_per_unit);
			Console.WriteLine("asset currency: " + item.asset.currency);
			Console.WriteLine("asset appid: " + item.asset.appid);
			Console.WriteLine("asset contextid: " + item.asset.contextid);
			Console.WriteLine("asset id: " + item.asset.id);
			Console.WriteLine("asset amount: " + item.asset.amount);
			Console.WriteLine();
		}
		
	}
}

public class ListingResponse
{
	public Dictionary<string, NewListedItem> listinginfo { get; set; }
}

public class Asset
{
    public string currency { get; set; }
    public string appid { get; set; }
    public string contextid { get; set; }
    public string id { get; set; }
    public string amount { get; set; }
}
public class NewListedItem
{

    public string listingid { get; set; }
    public string price { get; set; }
    public string fee { get; set; }
    public string publisher_fee_app { get; set; }
    public string publisher_fee_percent { get; set; }
    public string steam_fee { get; set; }
    public string publisher_fee { get; set; }
    public string converted_price { get; set; }
    public string converted_fee { get; set; }
    public string converted_currencyid { get; set; }
    public string converted_steam_fee { get; set; }
    public string converted_publisher_fee { get; set; }
    public string converted_fee_per_unit { get; set; }
    public string converted_steam_fee_per_unit { get; set; }
    public string converted_publisher_fee_per_unit { get; set; }
    public Asset asset { get; set; }


}
;