FSharp.SystemTextJson icon indicating copy to clipboard operation
FSharp.SystemTextJson copied to clipboard

System.Text.Json extensions for F# types

Results 40 FSharp.SystemTextJson issues
Sort by recently updated
recently updated
newest added

Thanks for making this! I didn't see this in the docs so I thought I'd mention it here: when registering a custom `JsonConverter` for a type in `JsonFSharpTypes` (e.g. records),...

I am writing an asp.net webapi program and in the setup section I added `Services.AddJsonOptions( ... JsonFSharpOptions)`. The options is `WithUnionInternalTag`, which is used for default serialization. But for individual...

Allow specifying which attributes should apply to a given property or union case in the options. This is useful to override the format of a type that is not under...

enhancement

Allow using `typedefof` to override options for all instances of a generic type. Example: ```fsharp let options = FSharpJsonOptions() .WithOverrides(fun o -> dict [ typedefof, o.WithUnionTagName("Result") ]) .ToJsonSerializerOptions() JsonSerializer.Serialize((Ok "test":...

enhancement

Consider this type: ```f# type A = { A: int option; B: bool } ``` When deserializing this: ```f# "{\"A\": null}" ``` It fails with this message: > Missing field...

Hi! I would like to achieve the following serialization result for maps, when key is DU (case sensitivity for keys does not matter). ``` { "key-values": { "Key1": { "string-value":...

I have a Robot type with a string property Model I get an json that has a Model type with Name and Version for this I create a ModelConverter and...

To be able to serialise into a typical (untagged) typescript union I propose adding support for a `JsonUnionEncoding.Untagged ||| JsonUnionEncoding.UnwrapSingleFieldCases` combination that support untagged and unwrapped cases. Types such as...

Noticed this issue when using `ThothLike().WithSkippableOptionFields()` however a minimal repro can be achieved with `WithSkippableOptionFields()` alone. Repro: ``` open System.Text.Json open System.Text.Json.Serialization let opts = JsonFSharpOptions().WithSkippableOptionFields().ToJsonSerializerOptions() type MyUnion = |...

Discriminated unions that are self-referential and any mutually recursive types are not supported. Using the $id and $ref keys in JSON should allow this type of structure to be serialized....