Как привязать сложные данные json к классу модели в ASP.NET MVC?
I have some problem to bind json data to controller action method ,this json data pass to action method, this json data need to auto bind to model class.... Please convert complex json data into model class anyone can help me to create model class
Что я уже пробовал:
<pre>var Object={ "categoryId": "1", "manufacturerId": "0", "vendorId": "0", "priceRangeFilterModel7Spikes": { "CategoryId": "1", "ManufacturerId": "0", "VendorId": "0", "SelectedPriceRange": {}, "MinPrice": "54.99", "MaxPrice": "1800" }, "specificationFiltersModel7Spikes": { "CategoryId": "1", "ManufacturerId": "0", "VendorId": "0", "SpecificationFilterGroups": [{ "Id": 2, "IsMain": true, "FilterItems": [{ "Id": "6", "FilterItemState": "Checked" }, { "Id": "7", "FilterItemState": "Unchecked" }] }, { "Id": 3, "FilterItems": [{ "Id": "8", "FilterItemState": "Unchecked" }, { "Id": "9", "FilterItemState": "Unchecked" }, { "Id": "10", "FilterItemState": "Unchecked" }] }], "Priority": 1 }, "attributeFiltersModel7Spikes": { "CategoryId": "1", "ManufacturerId": "0", "VendorId": "0", "AttributeFilterGroups": [{ "Id": 1, "FilterItems": [{ "ValueId": "38", "ProductVariantAttributeIds": ["14"], "FilterItemState": "Unchecked" }, { "ValueId": "39", "ProductVariantAttributeIds": ["14"], "FilterItemState": "Unchecked" }] }] }, "manufacturerFiltersModel7Spikes": { "CategoryId": "1", "ManufacturerFilterItems": [{ "Id": "1", "FilterItemState": "Unchecked" }, { "Id": "2", "FilterItemState": "Unchecked" }] }, "vendorFiltersModel7Spikes": { "CategoryId": "1", "VendorFilterItems": [] }, "pageNumber": null, "orderby": "0", "viewmode": "grid", "pagesize": "6", "queryString": "", "shouldNotStartFromFirstPage": false, "onSaleFilterModel": { "CategoryId": "1", "ManufacturerId": "0", "VendorId": "0" }, "keyword": "", "searchCategoryId": "0", "searchManufacturerId": "0", "searchVendorId": "0", "priceFrom": "", "priceTo": "", "includeSubcategories": "False", "searchInProductDescriptions": "False", "advancedSearch": "False", "isOnSearchPage": "False", "inStockFilterModel": { "CategoryId": "1", "ManufacturerId": "0", "VendorId": "0", "Id": "1", "FilterItemState": "Checked" } }