Hello, there is a json type object:

{ "status": 1, "data": { "http://www.artlebedev.ru": { "lda": "100,0,0:7,2:16,3:9,4:68,7:38,10:15,11:26,12:11,13:6,14:14,15:229,18:25,22:15,23:95,25:38,27:32,28:64,29:4,30:42,34:17,37:22,39:77,41:75,42:173,45:52,50:36,51:62,52:11,54:8,55:7,56:1,57:13,63:104,64:77,66:34,67:47,68:37,70:58,71:9,72:29,74:146,75:20,76:255,77:10,84:67,85:21,86:18,88:14,91:198,92:33,95:30,96:37", "topics": [ { "t": "/Culture/Movies", "n": "Культура/Кино", "w": 0.724247 }, { "t": "/Business/General", "n": "Бизнес/Универсальное", "w": 0.670288 }, { "t": "/Media/TV", "n": "СМИ/Телевидение", "w": 0.645545 } ] } }, "request_time": 5.378 } 

The parameter http://www.artlebedev.ru is dynamic and depends on the transmitted url to the server. How to parse such a dynamic document, if in newtonsoft json you need to fully specify the static structure of the document?

    1 answer 1

    There is not necessarily a particular parse class (if I correctly understood the problem).
    Alternatively, you can prepare a set of structures (classes), then request this dynamic parameter http://www.newtonsoft.com/json/help/html/QueryJsonSelectToken.htm and decide which structure to parse.

    Or some options with dynamic
    http://www.newtonsoft.com/json/help/html/QueryJsonDynamic.htm
    c LINQ
    http://www.newtonsoft.com/json/help/html/QueryJsonLinq.htm