46
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
5
public class Program
6
{
7
public class Human
8
{
9
public string FirstName{ get; set; }
10
public string LastName{ get; set; }
11
public List<Clothing> clothings { get; set; }
12
}
13
14
public class Clothing
15
{
16
public string ClothingID{ get; set; }
17
public string ColorTop{ get; set; }
18
public string ColorPants{ get; set; }
19
}
20
21
public class CurrentClothes
22
{
23
public string ColorTop{ get; set; }
24
public string ColorPants{ get; set; }
Cached Result
Environment version: .NET 9.0.0 (9.0.0), Unix 6.8.0.1014
Newtonsoft.Json version: Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
Re-serialized MyApiResponseClass:
{
"custom_attributes": [
{
"attribute_code": "required_options",
"value": "simple"
},
{
"attribute_code": "category_ids",
"value": [
"2"
]
},
{
"attribute_code": "has_options",
"value": "0"
},
{
"attribute_code": "an_object",
"value": {
"0": "1"
}
}
]
}
Newtonsoft.Json version: Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
Re-serialized MyApiResponseClass:
{
"custom_attributes": [
{
"attribute_code": "required_options",
"value": "simple"
},
{
"attribute_code": "category_ids",
"value": [
"2"
]
},
{
"attribute_code": "has_options",
"value": "0"
},
{
"attribute_code": "an_object",
"value": {
"0": "1"
}
}
]
}