I'm making a json out of a class in c# and for making the json smaller i want to replace the string keys with numbers which correspond to a number of enums. an example would be a json the looks like this:
{
"initdata":
{
"cell": {
"apn": "n",
"userName": "n",
"password": "n",
"number": "n"
},
"wifi": {
"mode": "AP",
"ssid": "m",
"password": ","
},
"ports": {
"p1": "k",
"p2": "y",
"p3": "5"
}
}
and enums that looks like this :
public enum celle { apn, userName, password, number };
public enum wifie { mode, ssid, password };
public enum portse { p1, p2, p3 };
public enum initdatae { cell , wifi , ports};
public enum settingse { initdata, timers }
and then I want the json to look like this :
{
"0":
{
"0": {
"0": "n",
"1": "n",
"2": "n",
"3": "n"
},
"1": {
"0": "AP",
"1": "m",
"2": ","
},
"2": {
"0": "k",
"1": "y",
"2": "5"
}
}
Thanks