Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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


What I have tried:

<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"
    }
}
Posted
Updated 20-Dec-19 4:59am

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900