You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TimeSpan type includes the method FromSeconds(double), and in .NET 9.0, a new overload FromSeconds(long) was introduced. The reflection logic for FromSeconds needs to be updated to specify the exact parameter types. Without this fix, the code will throw exceptions such as:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> Jil.DeserializationException: The type initializer for 'Jil.Deserialize.InlineDeserializer`1' threw an exception.
---> System.TypeInitializationException: The type initializer for 'Jil.Deserialize.InlineDeserializer`1' threw an exception.
---> System.Reflection.AmbiguousMatchException: Ambiguous match found for 'System.TimeSpan System.TimeSpan FromSeconds(Int64)'.
at System.RuntimeType.GetMethodImplCommon(String name, Int32 genericParameterCount, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers)
at System.Type.GetMethod(String name, BindingFlags bindingAttr)
at Jil.Deserialize.InlineDeserializer`1..cctor()
The text was updated successfully, but these errors were encountered:
@kevin-montrose could you please give this issue a priority? some users are already broken when using Jil on .NET 9.0. Look this issue reported back in July too #363.
@kevin-montrose please approve PR or at least confirm that this serializer is out of support, so that I could have a proof reason to spend effort on replacing Jill with System.text.json.
The
TimeSpan
type includes the methodFromSeconds(double)
, and in .NET 9.0, a new overloadFromSeconds(long)
was introduced. The reflection logic for FromSeconds needs to be updated to specify the exact parameter types. Without this fix, the code will throw exceptions such as:The text was updated successfully, but these errors were encountered: