Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace OrchardCore.Commerce.MoneyDataType.Serialization;

public sealed class AmountConverter : JsonConverter<Amount>
{
public static readonly AmountConverter Instance = new();
public const string ValueName = "value";
public const string CurrencyName = "currency";
public const string Name = "name";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace OrchardCore.Commerce.MoneyDataType.Serialization;

public sealed class CurrencyConverter : JsonConverter<ICurrency>
{
public static readonly CurrencyConverter Instance = new();
public override ICurrency Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) =>
Currency.FromIsoCode(reader.GetString());

Expand Down
Loading