fix: Parse ServerAddress as normal string
The "JsonValueOrArrayConverter<T>" doesn't work the way I thought it would. When it is associated with a property via the JsonConverter attribute, dotnet json parsing code throws an exception if "T" isn't assignable to the property type.
This commit is contained in:
1 parent
6a628a3070
commit
e5bbc26da5
1 file changed
-3
@@ -1,7 +1,5 @@
|
||||
using mbts.utils;
|
||||
|
||||
using Spark.Core.Json;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -11,7 +9,6 @@ using System.Text.RegularExpressions;
|
||||
namespace BCG;
|
||||
|
||||
public class PubSubRoute : IEquatable<PubSubRoute>, IComparable<PubSubRoute> {
|
||||
[JsonConverter(typeof(JsonValueOrArrayConverter<string>))]
|
||||
[JsonPropertyName("server_address")]
|
||||
public string? ServerAddress { get; set; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user