using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using System.ComponentModel;
using System.Globalization;
using System.Collections.Specialized;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Runtime.Serialization.Formatters;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
static JToken GetGoodJson()
new JProperty("attrList",
new JProperty("name", "Attendee Status"),
new JProperty("val", "Accepted")
new JProperty("name", "Attendee Type"),
new JProperty("val", "Attendee")
static JToken GetBadJson()
new JProperty("attrList",
new JProperty("name", "Attendee Status"),
new JProperty("val", "Accepted"),
new JProperty("name", "Attendee Type"),
new JProperty("val", "Attendee")
public static void Main()
Console.WriteLine("Required JSON: ");
var json = GetGoodJson();
Console.WriteLine("Attempting to reproduce the problem: ");
Console.WriteLine(GetBadJson());
Console.WriteLine(ex.Message);