20
1
using System;
2
using System.Collections.Generic;
3
4
class Person
5
{
6
public string name;
7
public string surname;
8
public Person(string n, string s) { name = n; surname = s; }
9
}
10
11
public class Program
12
{
13
List<Person> People = new List<Person>();
14
15
public static void Main()
16
{
17
People.Add(new Person("Adolf", "Hitler"));
18
Console.WriteLine("Done!");
19
}
20
}
Cached Result
Environment version: .NET 9.0.0 (9.0.0)
Newtonsoft.Json version: Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
Re-serialized RootObject
{
"data": [
{
"propertyNames": {
"0": {
"a": "a1",
"b": "b1",
"z": "z1"
},
"1": {
"a": "a2",
"b": "b2",
"z": "z2"
}
},
"otherProperty": "abc"
},
{
"propertyNames": {
"1": {
"a": "a1",
"b": "b1",
"z": "z1"
},
"2": {
"a": "a2",
"b": "b2",
"z": "z2"
}
},
"otherProperty": "bce"
}
]
}
Newtonsoft.Json version: Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
Re-serialized RootObject
{
"data": [
{
"propertyNames": {
"0": {
"a": "a1",
"b": "b1",
"z": "z1"
},
"1": {
"a": "a2",
"b": "b2",
"z": "z2"
}
},
"otherProperty": "abc"
},
{
"propertyNames": {
"1": {
"a": "a1",
"b": "b1",
"z": "z1"
},
"2": {
"a": "a2",
"b": "b2",
"z": "z2"
}
},
"otherProperty": "bce"
}
]
}