I have the following JSON string:
{
"region" : {
"center" : {
"title" : "Center Region"
},
"east" : {
"title" : "East Region - Form"
}
},
"buttons" : {
"save" : "Save"
},
"fields" : {
"labels" : {
"firstName" : "First Name",
"lastName" : "Last Name",
"chooseLocale" : "Choose Your Locale"
}
}
}
I was wondering whether this (see below) is the correct representation of the JSON string in C#:
public class Region
{
public Region() { }
}
public class Center : Region
{
public Center() { }
public string title { get; set; }
}
public class East : Region
{
public East() { }
public string title { get; set; }
}
public class Buttons
{
public Buttons() { }
public string save { get; set; }
}
public class Fields
{
public Fields() { }
}
public class Labels : Fields
{
public Labels() { }
public string firstName { get; set; }
public string lastName { get; set; }
public string chooseLocale { get; set; }
}
I need the correct object representation which I can then serialize using JsonConvert.SerializeObject(object); in order to produce the JSON string above.