I was able to do the search with your JSON file using the native JavaScriptSerializer.
I changed the resulting object to
public class schemaresult
{
public schema result { get; set; }
}
public class schema
{
public Item[] Items { get; set; }
public string ItemsGameUrl { get; set; }
public int Status { get; set; }
}
public class Item
{
public string Name { get; set; }
public int Defindex { get; set; }
public string ItemClass { get; set; }
public string ItemTypeName { get; set; }
public string ItemName { get; set; }
public bool ProperName { get; set; }
public int ItemQuality { get; set; }
public string ImageInventory { get; set; }
public int MinIlevel { get; set; }
public int MaxIlevel { get; set; }
public string ImageUrl { get; set; }
public string ImageUrlLarge { get; set; }
public string ItemDescription { get; set; }
public Attribute[] Attributes { get; set; }
public string ItemSet { get; set; }
}
public class Attribute {
public string name { get; set; }
public string @class { get; set; }
public string value { get; set; }
}
And changed conversion code to
var json = File.ReadAllText(dota2schemaFilePath);
System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
serializer.MaxJsonLength = Int32.MaxValue;
var schema_result = serializer.Deserialize<schemaresult>(json);
foreach (Item item in schema_result.result.Items )
{
if (item.Defindex == 4793)
{
itemname = item.Name;
break;
}
};