using System.Collections.Generic;
using Newtonsoft.Json.Linq;
public static void Main()
var inputJson = "{\n \"id\": 212,\n \"job\": {\n \"id\": 6597,\n \"jobNumber\": {{JobCode}},\n \"model\": \"885\",\n },\n \"archiveReturns\": [\n {\n \"id11\": 601,\n }\n ]\n}\n";
var outputJson = inputJson;
for (var i = min; i <= max; i++)
outputJson = inputJson.Replace("{{JobCode}}", i.ToString());
var messagePartIndex = outputJson.IndexOf(i.ToString());
var messagePart = outputJson.Substring(messagePartIndex - 10, 50);
var list = new List<object>
new { Key = 1, Value = "One" },
new { Key = 2, Value = "Two" },
List = new List<object>(),
dump.List.Add(new { Key = 1, Value = "One" });
dump.List.Add(new { Key = 22, Value = "Twooo" });
Console.WriteLine(JsonConvert.SerializeObject(dump));
var json = JObject.Parse(@"{
JToken data = json.SelectToken("$.test.data");
private static void Show(object o)
if (o!= null & o is not string && !o.GetType().IsPrimitive)
Console.WriteLine($"|{o?.ToString()}|");
private static string Ser(object o)
var settings = new JsonSerializerSettings
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
return JsonConvert.SerializeObject(o, settings);