-
Notifications
You must be signed in to change notification settings - Fork 152
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
Add support for JsonPropertyNameAttribute from System.Text.Json #925
Comments
#908 in fact has already merged with System.Text.Json support coming in 2.16. |
Hi, when shall 2.16 be released? |
@taooceros It was today. |
Good morning! I think the last package release does not solve the support issue. With version
works fine since on generated json
since Using |
Hi, You can notice it does not work fine just upgrading within the test application streamjson package and adding this lines in WebSocketClient
And then these others in JsonRpcServer.cs on in Web project:
|
I'll take a look. |
It's funny, because we have a test that suggests the attribute works:
(look further down in the file to see use of the attribute). We also have this test: vs-streamjsonrpc/test/StreamJsonRpc.Tests/JsonRpcTests.cs Lines 2906 to 2912 in 1feb491
Which demonstrates it works for custom named argument objects. So I tried your repro. It behaves for me. Can you send me a repro project that I can execute? |
Sure! I have forked your Thanks in advance! |
Thanks, @juaal12. But your sample doesn't use the formatter for |
Hi @AArnott , I have updated the repository with your proposals in the last message. You can take a look if you want but by my side, after applying the changes, it works like a charm, so maybe this is not an issue anymore and we can close the thread. Nevertheless, if you want to try it, my repo has been updated! Thanks a lot and sorry for the inconvenience! |
Hi,
Is it planned to add support for System.Text.Json?
I have seen several closed issues regarding this topic (#766 and #305 for example).
In my case I have to use Newtonsoft just to apply a property renaming on my server call. I think we must support System.Text.Json since it is faster, lighter and for sure it will the be standard way for future applications since .NET 6 introduced it.
Thanks in advance!
The text was updated successfully, but these errors were encountered: