Вот как вы можете сгенерировать CSV из вашего файла JSON, используя Cinchoo ETL
StringBuilder msg = new StringBuilder();
using (var p = new ChoJSONReader("*** YOUR JSON FILE PATH ***")
.WithJSONPath("$.inputFile[*]")
)
{
using (var w = new ChoCSVWriter(msg))
{
w.Write(p);
}
Console.WriteLine(msg.ToString());
}
Выход:
Column1,Column2,Column3,Column4,Column5,Column6,Column7,Column8,Column9,Column10
A,B,C,D,E,F,G,H,I,J
K,L,M,N,O,P,Q,R,S,T
UPDATE:
string json = @"
{
""inputFile"": [
[""Column1"", ""Column2"", ""Column3"", ""Column4"", ""Column5"", ""Column6"", ""Column7"", ""Column8"", ""Column9"", ""Column10""],
[ ""A"", ""B"", ""C"", ""D"", ""E"", ""F"", ""G"", ""H"", ""I"", ""J"" ],
[ ""K"", ""L"", ""M"", ""N"", ""O"", ""P"", ""Q"", ""R"", ""S"", ""T"" ]
]
}";
StringBuilder msg = new StringBuilder();
using (var p = ChoJSONReader.LoadText(json)
.WithJSONPath("$.inputFile[*]")
)
{
using (var w = new ChoCSVWriter(msg))
{
w.Write(p);
}
Console.WriteLine(msg.ToString());
}