0

I am trying to parse this Json string in c# in order to access the information that is related to the "decks". Here is the string:

{
    "error": "OK",
    "limit": 100,
    "offset": 0,
    "number_of_page_results": 1,
    "number_of_total_results": 1,
    "status_code": 1,
    "results": [{
        "deck": "He's Guybrush Threepwood, mighty pirate\u2122! The protagonist of the popular Monkey Island franchise.",
        "name": "Guybrush Threepwood",
        "resource_type": "character"
    }],
    "version": "1.0"
}

I am trying to get "He's Guybrush Threepwood, mighty pirate\u2122! The protagonist of the popular Monkey Island franchise." into a new string. This is just an example the same will be done for other strings in a similar way.

lincolnk
  • 11,218
  • 4
  • 40
  • 61
  • If you had an object in c# which matched the fields in your json, it works be quite easy to access the data contained within. – Chris May 01 '14 at 00:25

1 Answers1

0

Dynamic json is your best buddy in this situation. See the following post on how to implement the same http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2010/08/22/using-c-4.0-and-dynamic-to-parse-json.aspx

pushpraj
  • 13,458
  • 3
  • 33
  • 50