json Bugs from Newtonsoft.Json to System.Text.Json
This commit is contained in:
@ -11,6 +11,7 @@ using OI.Metrology.Shared.Repositories;
|
||||
using OI.Metrology.Shared.Services;
|
||||
using OI.Metrology.Viewer.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json;
|
||||
|
||||
// using System.Data.Common;
|
||||
|
||||
@ -39,7 +40,7 @@ public class ToolTypesController : Controller
|
||||
{
|
||||
Results = _Repo.GetToolTypes().Select(tt => new { tt.ToolTypeName, tt.ID })
|
||||
};
|
||||
return Json(r);
|
||||
return Json(r, new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
||||
}
|
||||
|
||||
// Gets the metadata for a tooltype, accepts a parameter which sorts the results
|
||||
@ -63,7 +64,7 @@ public class ToolTypesController : Controller
|
||||
Metadata = md
|
||||
}
|
||||
};
|
||||
return Json(r);
|
||||
return Json(r, new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
|
||||
}
|
||||
|
||||
// Gets headers, request/response format is to allow paging with igniteUI
|
||||
|
Reference in New Issue
Block a user