I have a code that serializes and converts the fields of a database to JSON
, through JsonConvert
, and the problem is that I want to modify the normal format of JSON
, which follows the structure as in this link .
Here is the code part, but what it does is that it generates a% normal JSON
, but I do not know how to modify it, according to the link:
C #
public class DatosCatPuestoGeneral
{
public List<arrDatosCatPuestoGeneral> DatosCatalogoPuestoGeneral = new List<arrDatosCatPuestoGeneral>();
public string toJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this);
}
}