How to format List <List <int>> as a table in a JSON file?

I am using the Newtonsoft.Json library to serialize and deserialize .NET objects. One of the things I'm serializing is tables (presented as List<List<int>>). I need to format them in a serialized file, like in a table, and not as columns, as they are formatted now. Is there any way to achieve this?

Now I have the following formatting in a json file:

"Table": [
          [
            1024,
            1024,
            1024,
            1024    
          ],
          [
            1024,
            1024,
            1024,
            1024
          ],
          [
            1024,
            1024,
            1024,      
            1024           
          ]
         ]

I want to achieve this:

"Table": [
          [1024, 1024, 1024, 1024],
          [1024, 1024, 1024, 1024],
          [1024, 1024, 1024, 1024]                           
         ]
0
source share
1 answer

, .
, columnName columnValue List<Map<string /*columndName*/, int>>

+2

All Articles