Skip to content

Commit bb9e701

Browse files
Don't use newtonsoft json
1 parent 0fdb945 commit bb9e701

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/Umbraco.Commerce.Checkout/Views/UmbracoCommerceCheckout/UmbracoCommerceCheckoutInformationPage.cshtml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@using Newtonsoft.Json;
1+
@using System.Text.Json
22
@inherits UmbracoViewPage
33
@{
44
Layout = "UmbracoCommerceCheckoutLayout.cshtml";
@@ -72,11 +72,11 @@
7272
@foreach (var country in countries)
7373
{
7474
<option value="@(country.Id)" @Html.Raw(currentOrder.PaymentInfo.CountryId == country.Id ? "selected=\"selected\"" : "")
75-
data-regions="@(JsonConvert.SerializeObject((await UmbracoCommerceApi.Instance.GetRegionsAsync(country.StoreId, country.Id)).Select(x => new
76-
{
77-
id = x.Id,
78-
name = x.Name,
79-
})))">
75+
data-regions="@(JsonSerializer.Serialize((await UmbracoCommerceApi.Instance.GetRegionsAsync(country.StoreId, country.Id)).Select(x => new
76+
{
77+
id = x.Id,
78+
name = x.Name,
79+
})))">
8080
@(country.Name)
8181
</option>
8282
}
@@ -119,11 +119,11 @@
119119
@foreach (var country in countries)
120120
{
121121
<option value="@(country.Id)" @Html.Raw(currentOrder.ShippingInfo.CountryId == country.Id ? "selected=\"selected\"" : "")
122-
data-regions="@(JsonConvert.SerializeObject((await UmbracoCommerceApi.Instance.GetRegionsAsync(country.StoreId, country.Id)).Select(x => new
123-
{
124-
id = x.Id,
125-
name = x.Name,
126-
})))">
122+
data-regions="@(JsonSerializer.Serialize((await UmbracoCommerceApi.Instance.GetRegionsAsync(country.StoreId, country.Id)).Select(x => new
123+
{
124+
id = x.Id,
125+
name = x.Name,
126+
})))">
127127
@(country.Name)
128128
</option>
129129
}

0 commit comments

Comments
 (0)