Skip to content

Commit 8a3f5f9

Browse files
author
Scott Bommarito
authored
Use JsonConvert for API keys list (#7256)
1 parent c848d16 commit 8a3f5f9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/NuGetGallery/Views/Users/ApiKeys.cshtml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
@model ApiKeyListViewModel
1+
@using Newtonsoft.Json
2+
@model ApiKeyListViewModel
23
@using NuGetGallery.Authentication
34
@{
45
ViewBag.Title = "API Keys";
@@ -463,7 +464,7 @@
463464

464465
@section bottomScripts {
465466
<script type="text/javascript">
466-
var initialData = @Html.Raw(Json.Encode(new
467+
var initialData = @Html.Raw(JsonConvert.SerializeObject(new
467468
{
468469
ApiKeys = Model.ApiKeys,
469470
PackageOwners = Model.PackageOwners,

0 commit comments

Comments
 (0)