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

NodaTime Structs as dictionary keys in System.Text.Json #114

Closed
buvinghausen opened this issue Feb 15, 2024 · 7 comments
Closed

NodaTime Structs as dictionary keys in System.Text.Json #114

buvinghausen opened this issue Feb 15, 2024 · 7 comments

Comments

@buvinghausen
Copy link
Contributor

Jon I have gone digging it looks like they exposed two virtual functions on JsonConverter in ReadAsPropertyName and WriteAsPropertyName and it doesn't look like the STJ serialization package supports either.

I'm going to take a stab at supporting it and tests and will open a PR as we use LocalDate as a dictionary key and need the support

image

@jskeet
Copy link
Member

jskeet commented Feb 15, 2024

Righto, sounds good.

@buvinghausen
Copy link
Contributor Author

Righto, sounds good.

PR up no rush on release as I have just ported the code into our repository and I'm #back2good

@jskeet
Copy link
Member

jskeet commented Feb 17, 2024

Thanks - will get to it when I can. I'm reasonably comfortable ditching the netcoreapp3.1 target now that it's been out of support for a while.

@buvinghausen
Copy link
Contributor Author

Yeah everything below .NET 6 has been out of support for over a year plus if someone is still running on 3.1 or 5 they can still use the .netstandard + STJ nuget shim.

@jskeet
Copy link
Member

jskeet commented Mar 10, 2024

This is fixed in #120, but not yet released. I'll try to get round to a release next weekend, but I'll want to check for anything else we might want to do first.

@jskeet
Copy link
Member

jskeet commented Mar 18, 2024

This is now in version 1.2.0. Please shout if you run into any problems.

@jskeet jskeet closed this as completed Mar 18, 2024
@buvinghausen
Copy link
Contributor Author

Thanks Jon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants