-1

I want to retrieve the values from a Json array in my c# controller. Here's my json array :

 {
    name : "Name 1", 
    description : "Description 1",
     count : 6
    }

How i can retrieve each attribute in my c# controller ? i know how to do it if i deal with Objects but this json is not from a Object.

 public IList[] getList(IList[] myList)
        {
  // How to get the value of the name and the description here ?

}
user708683
  • 500
  • 3
  • 9
  • 26
  • To much code to do a simple task ! I will finally create a class with all the attribute i will need and then retrieve them this way : myList.name, myList.description, etc. – user708683 Feb 09 '16 at 15:04

1 Answers1

1

I will finally create a class with all the attributes i will need and then retrieve them the same way i do with an Object :

 CustomClass myClass ;

 string name = myClass.name
 string description = myClass.description;
 int count= myClass.count
 ...
user708683
  • 500
  • 3
  • 9
  • 26