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

JsonNode.GetValueKind does not work on .NET 6 and 7, but page says it does. #9919

Closed
vebcaster opened this issue May 16, 2024 · 4 comments
Closed
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners Pri3 Indicates issues/PRs that are low priority

Comments

@vebcaster
Copy link

This page https://learn.microsoft.com/en-us/dotnet/api/system.text.json.nodes.jsonnode.getvaluekind?view=net-8.0 says that JsonNode.GetValueKind applies to .NET 6, 7, 8, 9. But it does not work on 6 & 7. Only on 8 (and probably 9).

@issues-automation issues-automation bot added the Pri3 Indicates issues/PRs that are low priority label May 16, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 16, 2024
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 16, 2024
@gewarren
Copy link
Contributor

@vebcaster - When you say it doesn't work, what do you mean exactly? That the API isn't available?

@colejohnson66
Copy link
Contributor

On .NET 7 and earlier, you must reference the System.Text.Json NuGet package.

https://apisof.net/catalog/b375c8021f1d0888ff72d7c28638e3a2

@gewarren
Copy link
Contributor

The page does show which package is needed for .NET 7:

image

I realize that the docs also show a package for .NET 8/9, because that version of the API essentially hides the "in-box" version. We're working on a fix for that, and I've added a link to this issue in that internal work item.

@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners Pri3 Indicates issues/PRs that are low priority
Projects
None yet
Development

No branches or pull requests

3 participants