diff --git a/Iceshrimp.Backend/Core/Federation/ActivityStreams/ASSerializer.cs b/Iceshrimp.Backend/Core/Federation/ActivityStreams/ASSerializer.cs index 8c9b5f67..487557c3 100644 --- a/Iceshrimp.Backend/Core/Federation/ActivityStreams/ASSerializer.cs +++ b/Iceshrimp.Backend/Core/Federation/ActivityStreams/ASSerializer.cs @@ -32,6 +32,15 @@ public static class ASSerializer return obj.ToObject(); } + if (reader.TokenType == JsonToken.String && typeof(T).IsAssignableFrom(reader.ValueType)) + return reader.Value; + + if (reader.TokenType == JsonToken.Integer && typeof(T).IsAssignableFrom(reader.ValueType)) + return reader.Value; + + if (reader.TokenType == JsonToken.Float && typeof(T).IsAssignableFrom(reader.ValueType)) + return reader.Value; + return null; }