RiverOx.Utility 1.0.1

Converts SQL DataTable to JSON format.


Add the nuget package in your project.
Use the function below.
RiverOx.Utility.Convert.SqlToJson(DataTable, "primaryKeyColumnName")

Install-Package RiverOx.Utility -Version 1.0.1
dotnet add package RiverOx.Utility --version 1.0.1
<PackageReference Include="RiverOx.Utility" Version="1.0.1">
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RiverOx.Utility --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

Relase Note []
SQL Datatable to JSON format.
Allowed converstion  


ta.colA0 AS colA0, -- Primary Key
ta.colA1 AS colA1,
tb.colB0 AS B.colB0,
tb.colB1 AS B.colB1,
tc.colC0 AS B.C[colC0],
tc.colC1 AS B.C[colC1]
td.colD0 AS D[colD0],
td.colD1 AS D[colD1]

FROM TableA ta
LEFT JOIN TableB tb on ta.colA0 = tb.colB0
LEFT JOIN TableC tc on tb.colB0 = tc.colC0
LEFT JOIN TableD td on tc.colC0 = td.colD0

| colA0   colA1   B.colB0  B.colB1  B.C[colC0]  B.C[colC1]   D[colD0] D[colD1]   |

| 1        ARow1  BRow11   BRow12   CRow11      CRow11A      DRow11   DRow11A    |
| 1        ARow1  BRow11   BRow12   CRow12      CRow12A      DRow12   DRow12A    |

   "colA0": 1,
   "colA1": "ARow1",
   "B": {
     "colB0": "BRow11",
     "colB1": "BRow12",
     "C": [
{"colC0": "CRow11","colC1": "CRow11A"},
       {"colC0": "CRow12","colC1": "CRow12A"}
   "D": [
{"colD0": "DRow11","colD1": "DRow11A"}

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.1 433 7/16/2017