© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
8 replies
devhl

❔ Utf8JsonReader.GetString exceptions

This document seems to contradict itself. The returns section says if the token is null then you get null, but the exceptions say null will cause an exception. Am I understanding this right and it is wrong documentation?
https://learn.microsoft.com/en-us/dotnet/api/system.text.json.utf8jsonreader.getstring?view=net-7.0#returns
Utf8JsonReader.GetString Method (System.Text.Json)
Reads the next JSON token value from the source unescaped and transcodes it as a string.
Utf8JsonReader.GetString Method (System.Text.Json)
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Exceptions.
C#CC# / help
17mo ago
✅ Exceptions
C#CC# / help
2y ago
✅ Extracting an object from a Utf8JsonReader
C#CC# / help
4y ago
✅ MediatR exceptions
C#CC# / help
3y ago