Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8901

Kentico - JSON serializing custom page type returns different data

$
0
0
We have a custom page type Product which, when serialized to JSON (using Newtonsoft) outputs different fields to the properties on the Product.var product = ProductProvider.GetProducts().FirstObject; var json = JsonConvert.SerializeObject(product); produces the following JSON:{ "LogSynchronization": 3, "ObjectType": "cms.document.apollo.product", "UpdateTimeStamp": true, "LastUpdated": "2016-09-26T16:23:58.9228865Z", "Locked": false, "DataClass": null, "UpdateVersionGUID": true, "Components": [ { "LogSynchronization": 3, "ObjectType": "cms.node", "UpdateTimeStamp": true, "LastUpdated": "2016-09-26T16:23:58.9238891Z", "Locked": false, "DataClass": { "Locked": false, "IDWasChanged": false, "Data": [ 285, ... false ], "OriginalData": null, "ClassName": "CMS.Tree" }, "UpdateVersionGUID": true }, { ... } ] } How can I make this return an actual/traditional serialization of the Product class?

Viewing all articles
Browse latest Browse all 8901

Trending Articles