AleGO
AleGO

Reputation: 87

C# List<dictionary> To Json

I want to convert my List> to JSON string. Does anyone know how to achive this in C#?

Upvotes: 0

Views: 10231

Answers (1)

Habib
Habib

Reputation: 223402

Use JSON.Net

using Newtonsoft.Json;
List<Dictionary<string, string>> testDictionary = new List<Dictionary<string, string>()>();
string json = JsonConvert.SerializeObject(testDictionary);

Upvotes: 10

Related Questions