Skip to content

Conversation

@scottaddie
Copy link
Collaborator

@scottaddie scottaddie commented Oct 1, 2024

When C# string interpolation is used, the ToString() method is automatically invoked. The ToString() method on System.Text.Json.JsonElement already invokes GetString(): https://github.com/dotnet/runtime/blob/5535e31a712343a63f5d7d796cd874e563e5ac14/src/libraries/System.Text.Json/src/System/Text/Json/Document/JsonElement.cs#L1424-L1425. This behavior is also publicly documented at https://learn.microsoft.com/dotnet/api/system.text.json.jsonelement.tostring?view=net-8.0#remarks.

@trrwilson trrwilson merged commit b8ec620 into openai:main Oct 15, 2024
1 check passed
@scottaddie scottaddie deleted the scottaddie/code-sample-cleanup branch October 15, 2024 16:02
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

Successfully merging this pull request may close these issues.

2 participants