c# - How to serialize a multiple list of elements in Json? -


i have json looks this:

{      "identifier1":"textofidentifier1",     "identifier2":"textofidentifier2",     "identifier3":"textofidentifier3",     ... } 

i know how deseralize json custom object, followed says here, identifiers appear in same json tag...

how can identifiers inside json?

the solution in case:

using (streamreader r = new streamreader(path)) {      string json = r.readtoend();      jobject jsonlines = jobject.parse(json);      foreach (var token in jsonlines)      {          dtos.add(new tokendto { halid = token.key, sourcetext = token.value.tostring() });      } } 

Comments