Skip to content
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

Regression: 1.0 can't deserialize to non-public records #133

Closed
cmeeren opened this issue Oct 3, 2022 · 3 comments
Closed

Regression: 1.0 can't deserialize to non-public records #133

cmeeren opened this issue Oct 3, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@cmeeren
Copy link
Contributor

cmeeren commented Oct 3, 2022

I haven't done extensive testing, so the problem may be bigger than just internal records. But this fails with an exception:

open System.Text.Json
open System.Text.Json.Serialization

type internal T = { foo: string }
let json = """{ "foo": "" }"""

let private options = JsonSerializerOptions()
options.Converters.Add(JsonFSharpConverter())

JsonSerializer.Deserialize<T>(json, options) |> ignore

If I remove internal from the type definition, it works.

This worked fine in 0.19.13.

@cmeeren cmeeren changed the title 1.0 can't deserialize to non-public records Regression: 1.0 can't deserialize to non-public records Oct 4, 2022
@Tarmil Tarmil added the bug Something isn't working label Oct 4, 2022
@cmeeren
Copy link
Contributor Author

cmeeren commented Oct 6, 2022

Out of curiosity, any chance to fix this within a handful of days? I have some work that is semi-blocked by this. (Possible to work around, but cumbersome.)

Would like to help out, but unfortunately life is in the way for the foreseeable future; I'm completely swamped with other work.

@Tarmil
Copy link
Owner

Tarmil commented Oct 7, 2022

Fixed in v1.0.6 🙂

@Tarmil Tarmil closed this as completed Oct 7, 2022
@cmeeren
Copy link
Contributor Author

cmeeren commented Oct 7, 2022

Excellent, thank you so much! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants