Skip to content

Commit

Permalink
Fix inventory item serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Citrinate committed Feb 29, 2024
1 parent 4db4cde commit 8c20379
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CS2Interface/Helpers/AttributeConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public override Dictionary<string, IAttribute> Read(ref Utf8JsonReader reader, T
}

public override void Write(Utf8JsonWriter writer, Dictionary<string, IAttribute> value, JsonSerializerOptions options) {
writer.WriteStartObject();
foreach (var kvp in value) {
var attribute = kvp.Value;
try {
Expand All @@ -26,6 +27,7 @@ public override void Write(Utf8JsonWriter writer, Dictionary<string, IAttribute>
ASF.ArchiLogger.LogGenericException(e);
}
}
writer.WriteEndObject();
}
}
}

0 comments on commit 8c20379

Please sign in to comment.