Skip to content

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

@cmeeren

Description

@cmeeren

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions