Skip to content

Commit

Permalink
Merge big integer converter and istate converter
Browse files Browse the repository at this point in the history
  • Loading branch information
Atralupus committed Mar 6, 2024
1 parent a1d44c1 commit 758282a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NineChroniclesUtilBackend.Store/Models/State/BaseData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class BaseData
{
protected static JsonSerializerSettings JsonSerializerSettings => new JsonSerializerSettings
{
Converters = { new BigIntegerToStringConverter(), new IStateJsonConverter() },
Converters = { new IStateJsonConverter() },
Formatting = Formatting.Indented,
NullValueHandling = NullValueHandling.Ignore
};
Expand Down
4 changes: 3 additions & 1 deletion NineChroniclesUtilBackend.Store/Util/IStateJsonConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s
{
JObject jo = JObject.FromObject(value, JsonSerializer.CreateDefault(new JsonSerializerSettings {
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
Converters = new List<JsonConverter>() { }
Converters = new List<JsonConverter>() { new BigIntegerToStringConverter() },
Formatting = Formatting.Indented,
NullValueHandling = NullValueHandling.Ignore
}));

IValue? ivalue = value switch
Expand Down

0 comments on commit 758282a

Please sign in to comment.