Problems trying to deserialize string into a object

161 views Asked by At

today I have a simple json object like this:

[
    {
        "Code": "My Sample Code",
        "Description": "My Sample Description",
        "Permissions": [
            {
                "Id": 432,
                "Name": "FIRSTPERMISSION"
            },
            {
                "Id": 32,
                "Name": "SECONDPERMISSION"
            }
        ]
    }
]

And I`m trying to bind it to an object. But the problem is: I'm on .Net Framework 1.1, which doesn't have the principal classes to do this work, like:

  • None of the Newtonsoft.Json (Json.Net) classes
  • System.Runtime.Serialization.Json.DataContractJsonSerializer
  • System.Web.Script.Serialization.JavaScriptSerializer
  • System.Runtime.Serialization.DataContractSerializer

And I tried to add Newtonsoft.Json reference from .net framework 2.0 to my app, without success.

How can I put the json string values into a object, to work with this?

Thanks a lot :-)

0

There are 0 answers