Decorate with both System.Text.Json & Newtonsoft.Json attributes?
Hello,
As you may know, TypedocConverter will probably be used a lot for Blazor libraries in order to wrap existing JS/TS projects.
The users of the said Blazor library may vary, some will use it in a context that uses System.Text.Json and some Newtonsoft.Json.
The idea would be to change the arg --use-system-json so it could be something like [true|false|both] for instance.
Wdyt ?
What the codegen will be with --use-system-json both? Are you expecting TypedocConverter to generate two bindings that one uses System.Text.Json and another uses Newtonsoft.Json?
The idea is to use them both at the same time:
//...
[System.Text.Json.Serialization.JsonPropertyName("someprop")]
[System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull)]
[Newtonsoft.Json.JsonProperty(PropertyName = "someprop", NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string? SomeProp{ get; set; } = null;
//...
It's just a suggestion though, I'm not sure. From what I recall, JS interop in Blazor rely on System.Text.Json and it cannot be changed while Newtonsoft.Json might still be "actually" used by the devs on the rest of the app for ease of use regarding certain use-cases.
Fixed in a59854487b446bd2211d9667751c9c7bf06bf494