I want to write data to a json file and read the data. However, the data in my json file is dynamic and may vary. I do not know what to use for this. Can you help?
My Json file is as follows:
{
"IpAddress": ".....",
"Port": 5000,
.....
"tracks": {
"audio1": "track1.mp3"
"audio2": "track2.mp3"
.....
}
}
CodePudding user response:
Use Nuget package Newtonsoft.Json
.
action:
public IActionResult Index5([FromBody]Object o)
{
return Ok(o);
}
the result of Object o
: