1
 {
     "payload": {
         "coordinators": [
             {
                 "coordinatorID": "1",
                 "remarks": "a",
                 "briefObservation": "a",
                 "justifyingRecommendation": "a",
                 "sectors": [
                     {
                         "sectorNumber": "8",
                         "projectDescription": "a",
                         "knowledgeMarks": "a",
                         "siteMarks": "a",
                         "impactAccessmentMarks": "a",
                         "empAddressingMarks": "a",
                         "totalMarks": "a",
                         "recommendation": "a",
                         "category": "a"
                     },
                     {
                         "sectorNumber": "10",
                         "projectDescription": "a",
                         "knowledgeMarks": "a",
                         "siteMarks": "a",
                         "impactAccessmentMarks": "a",
                         "empAddressingMarks": "a",
                         "totalMarks": "a",
                         "recommendation": "a",
                         "category": "a"
                     }
                 ]
             }
         ]
     },
     "status": 0,
     "message": "Success/Fail Reason"
 }
Praveen Reddy
  • 7,295
  • 2
  • 21
  • 43
Ashok
  • 11
  • 2
  • First, [deserielize](http://www.newtonsoft.com/json/help/html/DeserializeObject.htm) and then [inset into your SQL server](http://stackoverflow.com/questions/8389803/insert-data-into-sql-server-database). You have many options to do these operation. It is just an example. – elirandav Feb 18 '17 at 14:44
  • Which version of SQL server are you using? or are you using a different database? – Praveen Reddy Feb 18 '17 at 14:46
  • To get the C# classes for deserialization, enter the json text in [json2csharp.com](http://json2csharp.com/) and click on "generate". – Graffito Feb 18 '17 at 14:48

2 Answers2

2

Json.NET is your friend. You can find examples directly in the documentation.

http://www.newtonsoft.com/json/help/html/SerializingJSON.htm

"Store it in SQL" is a bit generic. Without knowing the database in question or more of the implementation target than the tag "C#" I can only guess. Here comes another link to a Youtube video tutorial - connecting to a MySQL db and inserting data with C#.

https://www.youtube.com/watch?v=U3bVc7E6UHA

cjuette
  • 31
  • 5
1

You have an article that could be useful here to deserialize json with c#:

To save an object to a database, you can have a look to this documentation.

Community
  • 1
  • 1