OK, I'm totally new to JSON and Json.NET - so please forgive my ignorance;
I'm trying to parse a string which comes from a GET request into something useful for me in a C# application.
The string contains a structure with nested JSON objects. The objects on the first level has UTF-8 encodings like \u0040
and escape characters like \. The next level contains another nested JSON object with double escape characters like \\
and so on (down to 5 escape characters!)..
It also contains "
representations for quotation marks like ".
My first assumtion is that these are nested JSON objects. How can I parse these nested objects into something useful for me to query with, for instance, LINQ? Do I have to write the logic my self, or is there a nice function for this in Json.NET already? The first bytes of the string to help clarify:
{\"phase\":2,\"id\":\"pagelet_search_results\",\"is_last\":true,\"css\":[\"Jo2rQ\",\"pxy5B\"],\"js\":[\"tVaAM\",\"rLVa6\",\"FJ3LF\"],\"resource_map\":{\"FJ3LF\":{\"type\":\"js\",\"src\":\"http:\\/\\/e.static.ak.fbcdn.net\\/rsrc.php\\/y8\\/p\\/r\\/1NVEOfjbXp5.js\"},\"pxy5B\":{\"type\":\"css\",\"permanent\":1,\"src\":\"http:\\/\\/f.static.ak.fbcdn.net\\/rsrc.php\\/yc\\/r\\/9H-KBGVNlw_.css\"}},\"onload\":[\"window.__UIControllerRegistry[\\\"c4d4ab726887b68c58602753\\\"] = new UIPagelet(\\\"c4d4ab726887b68c58602753\\\", \\\"\\\\\\/pagelet\\\\\\/generic.php\\\\\\/SearchObjectResultsPagelet\\\\\\/\\\", {\\\"params\\\":{\\\"viewerContext\\\":{\\\"userID\\\":123454549,\\\"accountID\\\":123454549,\\\"appID\\\":0,\\\"isOmnipotent\\\":false,\\\"isAuthenticated\\\":true,\\\"accessTokens\\\":[],\\\"instanceKey\\\":\\\"1254318719\\\\\\/1256318759\\\\\\/0\\\",\\\"originalViewerContext\\\":null,\\\"__index\\\":5,\\\"__sampleId\\\":null,\\\"__next\\\":-808,\\\"__state\\\":4,\\\"__preparer\\\":{\\\"runnablePreparables\\\":[],\\\"newRunnablePreparables\\\":[],\\\"blockedPreparables\\\":[],\\\"isRunning\\\":false,\\\"current\\\":null,\\\"isSequential\\\":false,\\\"round\\\":4,\\\"index\\\":3},\\\"__addedPreparers\\\":{\\\"3\\\":{\\\"runnablePreparables\\\":[],\\\"newRunnablePreparables\\\":[],\\\"blockedPreparables\\\":[],\\\"isRunning\\\":false,\\\"current\\\":null,\\\"isSequential\\\":false,\\\"round\\\":4,\\\"index\\\":3}},\\\"__siblings\\\":[],\\\"__children\\\":[],\\\"__ancestors\\\":[],\\
I appreciate your help, folks ;)