-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Text.Json does not support constructors with byref parameters. #46088
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Looks like System.Text.Json doesn't understand byrefs as ctor arguments? You can work around this for now by removing the |
Hi @GrabYourPitchforks |
@layomia - thoughts? |
@GrabYourPitchforks, @ilanb1996 sounds good, thanks! I'll assign the issue to you - please tag me with any questions. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Out of curiosity, what should be our expected approach to fixing this? I presume the error occurs when attempting to instantiate |
Once we address this issue we should make sure to re-enable the following disabled test: Lines 1295 to 1301 in 1a0c9ca
|
Description
I have a List of objects whose constructors take 'in' parameters of DateTime and TimeSpan.
When serializing a list of these objects, I am seeing the exception in the title being thrown:
This is specifically being thrown at IEnumerableDefaultConverter.cs line 255:
state.Current.DeclaredJsonPropertyInfo = state.Current.JsonClassInfo.ElementClassInfo!.PropertyInfoForClassInfo;
Unfortunately I have absolutely no clue what the issue is here. I'm hoping you might be able to help.
The text was updated successfully, but these errors were encountered: