Hello,
I want to convert a
Microsoft Dynamics NAV string c# to json.
i have the following string:
private static readonly NavTextConstant text003 = new NavTextConstant(new int[]{1036, 1033}, new string[]{"Vous ne pouvez pas renommer l'enregistrement %1.", "You cannot rename a %1."}, "Table 1192395785", "Table 1192395785 - NamedType 95063322");
I want to get this result:
{
"NavTextConstant": [
{
"Val1": {
1036,
1033
},
"Val2":{
"Vous ne pouvez pas renommer l'enregistrement %1.",
"You cannot rename a %1."
},
"Val3" : "Table 1192395785",
"Val4" : "Table 1192395785 - NamedType 95063322"
}
}
What I have tried:
I tried to use
Newtonsoft.Json.JsonConvert.SerializeObject
but it seem like it working only if i have a c# class.
In my case i'm getting this string from a file and I don't have a class c# declared for this type.