'How do I restructure this JSON object? [closed]
I want to convert json data from one format to another like below in c#. I want "Region" to be a list.
From:
{
"Document": {
"Regions": {
"Region": {
"Color": "#FFFF0000",
"Type": "Rectangle",
}
}
}
}
To:
{
"Document": {
"Regions": {
"Region": [{
"Color": "#FFFF0000",
"Type": "Rectangle"
}]
}
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
