V
V
vova_202017-01-17 20:35:23
JSON
vova_20, 2017-01-17 20:35:23

Who can help me figure out json parsing in C#? Or give an example of parsing?

Here is what I have:

{
  "GameLevels": [
    {
      "ID": 1,
      "Name": "Level1",
          "Rows": 6,
          "Cols": 5,
          "TilesLayout": [
            0,0,1,1,1,1,1,0,0,
            1,1,1,1,1,1,1,1,1,
            1,1,1,1,1,1,1,1,1,
            1,1,1,1,1,1,1,1,1,
            1,1,1,1,1,1,1,1,1,
            1,1,1,1,1,1,1,1,1,
            1,1,1,1,1,1,1,1,1,
            1,1,1,1,1,1,1,1,1,
            0,0,1,1,1,1,1,0,0
           ],
       "GameResultSetings": {
        "TargetPoint": 150
      }
    },
    {
      "ID": 2,
      "Name": "Level2",
          "Rows": 7,
          "Cols": 7,
          "TilesLayout": [
            0,0,1,1,1,1,1,0,0,
            1,1,1,1,1,1,1,1,1,
            1,1,1,1,0,1,1,1,1,
            1,1,1,1,0,1,1,1,1,
            1,1,1,1,0,1,1,1,1,
            1,1,1,1,0,1,1,1,1,
            1,1,1,1,0,1,1,1,1,
            1,1,1,1,1,1,1,1,1,
            0,0,1,1,1,1,1,0,0
           ],
       "GameResultSetings": {
        "TargetPoint": 150
      }
    }
  ]
}

It is necessary to receive the data from the file and use them in the future.
Can anyone give an example of how to do this correctly in C#?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2017-01-17
@vova_20

https://www.google.com.ua/search?q=json+%E2+C%23

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question