0

I have a json file this is its format:

{"resultset": {"row": [
       {"field": [1001001, 1, 1, 1, "In the beginning God{After \\\"God,\\\" the Hebrew has the two letters \\\"Aleph Tav\\\" (the first and last letters of the Hebrew alphabet) as a grammatical marker.} created the heavens and the earth."]},  
       {"field": [1001002, 1, 1, 2, "Now the earth was formless and empty. Darkness was on the surface of the deep. God's Spirit was hovering over the surface of the waters."]} 
]}}

How can i store this in a List? I want to store all the values in the "field" in a list. Note: I have a huge collection of data.

1 Answers1

1

Create an object like this:

public class Field
{
    /*Your properties here*/
}

public class Row
{
    public List<Field> field { get; set; }
}

public class Resultset
{
    public List<Row> row { get; set; }
}

public class RootObject
{
    public Resultset resultset { get; set; }
}

Deserialize the JSON to the rootobject, so you can browse to the list of fields.

Maarten
  • 660
  • 1
  • 6
  • 21