69 references to JsonCommentHandling
aspire (4)
JsonSourceGenerationContext.cs (2)
21ReadCommentHandling = JsonCommentHandling.Skip)] 56ReadCommentHandling = JsonCommentHandling.Skip,
src\Shared\Otlp\Serialization\OtlpJsonSerializerContext.cs (1)
23ReadCommentHandling = JsonCommentHandling.Skip,
Utils\ConfigurationHelper.cs (1)
20CommentHandling = JsonCommentHandling.Skip,
Aspire.Dashboard (6)
Model\GenAI\GenAIEvents.cs (1)
51ReadCommentHandling = JsonCommentHandling.Skip,
Model\GenAI\GenAIMessageParsingHelper.cs (1)
22CommentHandling = JsonCommentHandling.Skip,
Model\GenAI\GenAIMessages.cs (1)
292ReadCommentHandling = JsonCommentHandling.Skip,
Model\GenAI\GenAIVisualizerDialogViewModel.cs (1)
85CommentHandling = JsonCommentHandling.Skip,
Model\TextVisualizerViewModel.cs (1)
124CommentHandling = JsonCommentHandling.Allow,
src\Shared\Otlp\Serialization\OtlpJsonSerializerContext.cs (1)
23ReadCommentHandling = JsonCommentHandling.Skip,
Aspire.Hosting (2)
Pipelines\Internal\DeploymentStateManagerBase.cs (1)
82CommentHandling = JsonCommentHandling.Skip,
src\Shared\LaunchProfiles\LaunchSettingsSerializerContext.cs (1)
10[JsonSourceGenerationOptions(ReadCommentHandling = JsonCommentHandling.Skip, AllowTrailingCommas = true)]
Aspire.Hosting.Azure.Functions (1)
src\Shared\LaunchProfiles\LaunchSettingsSerializerContext.cs (1)
10[JsonSourceGenerationOptions(ReadCommentHandling = JsonCommentHandling.Skip, AllowTrailingCommas = true)]
Aspire.Hosting.Testing (1)
src\Shared\LaunchProfiles\LaunchSettingsSerializerContext.cs (1)
10[JsonSourceGenerationOptions(ReadCommentHandling = JsonCommentHandling.Skip, AllowTrailingCommas = true)]
dotnet-user-jwts (1)
Helpers\JwtSerializerOptions.cs (1)
13ReadCommentHandling = JsonCommentHandling.Skip,
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Protocol\JsonHubProtocol.cs (1)
928ReadCommentHandling = JsonCommentHandling.Disallow,
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (1)
205JsonDocument.Parse(token.ValueText, new JsonDocumentOptions { AllowTrailingCommas = false, CommentHandling = JsonCommentHandling.Disallow });
Microsoft.CodeAnalysis.Features (2)
EmbeddedLanguages\Json\LanguageServices\JsonLanguageDetector.cs (2)
192semanticModel.GetConstantValue(initExpr).Value is (byte)JsonCommentHandling.Allow or (byte)JsonCommentHandling.Skip)
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\VSCodeSettings.cs (1)
23CommentHandling = JsonCommentHandling.Skip,
Microsoft.Extensions.AI.Abstractions.Tests (1)
test\Shared\JsonSchemaExporter\TestData.cs (1)
23private static readonly JsonDocumentOptions _schemaParseOptions = new() { CommentHandling = JsonCommentHandling.Skip };
Microsoft.Extensions.AI.Tests (2)
Functions\AIFunctionFactoryTest.cs (2)
158JsonSerializerOptions options = new(AIJsonUtilities.DefaultOptions) { ReadCommentHandling = JsonCommentHandling.Skip }; 160JsonElement expectedResult = JsonDocument.Parse(jsonStringParam, new() { CommentHandling = JsonCommentHandling.Skip }).RootElement;
Microsoft.Extensions.Configuration.Json (1)
JsonConfigurationFileParser.cs (1)
26CommentHandling = JsonCommentHandling.Skip,
Roslyn.VisualStudio.Next.UnitTests (4)
UnifiedSettings\UnifiedSettingsTests.cs (4)
131var jsonDocument = await JsonNode.ParseAsync(registrationFileStream!, documentOptions: new JsonDocumentOptions { CommentHandling = JsonCommentHandling.Skip }); 144var jsonDocument = await JsonNode.ParseAsync(registrationFileStream!, documentOptions: new JsonDocumentOptions { CommentHandling = JsonCommentHandling.Skip }); 231var jsonDocument = await JsonNode.ParseAsync(registrationFileStream!, documentOptions: new JsonDocumentOptions { CommentHandling = JsonCommentHandling.Skip }); 244var jsonDocument = await JsonNode.ParseAsync(registrationFileStream!, documentOptions: new JsonDocumentOptions { CommentHandling = JsonCommentHandling.Skip });
Shared.Tests (1)
JsonSchemaExporter\TestData.cs (1)
23private static readonly JsonDocumentOptions _schemaParseOptions = new() { CommentHandling = JsonCommentHandling.Skip };
System.Text.Json (40)
src\libraries\System.Text.Json\Common\JsonSourceGenerationOptionsAttribute.cs (1)
123public JsonCommentHandling ReadCommentHandling { get; set; }
System\Text\Json\Document\JsonDocument.cs (2)
1136Debug.Assert(readerOptions.CommentHandling >= 0 && readerOptions.CommentHandling <= JsonCommentHandling.Allow); 1138if (readerOptions.CommentHandling == JsonCommentHandling.Allow)
System\Text\Json\Document\JsonDocumentOptions.cs (4)
16private JsonCommentHandling _commentHandling; 22/// Thrown when the comment handling enum is set to a value that is not supported (or not within the <see cref="JsonCommentHandling"/> enum range). 27public JsonCommentHandling CommentHandling 33if (value > JsonCommentHandling.Skip)
System\Text\Json\Reader\JsonReaderOptions.cs (4)
16private JsonCommentHandling _commentHandling; 22/// Thrown when the comment handling enum is set to a value that is not supported (i.e. not within the <see cref="JsonCommentHandling"/> enum range). 27public JsonCommentHandling CommentHandling 33if (value > JsonCommentHandling.Allow)
System\Text\Json\Reader\Utf8JsonReader.cs (10)
928if (_readerOptions.CommentHandling == JsonCommentHandling.Allow && _tokenType == JsonTokenType.Comment) 1044Debug.Assert((_trailingCommaBeforeComment && _readerOptions.CommentHandling == JsonCommentHandling.Allow) || !_trailingCommaBeforeComment); 1080case JsonCommentHandling.Disallow: 1082case JsonCommentHandling.Allow: 1089Debug.Assert(_readerOptions.CommentHandling == JsonCommentHandling.Skip); 1725if (_readerOptions.CommentHandling != JsonCommentHandling.Disallow) 1727if (_readerOptions.CommentHandling == JsonCommentHandling.Allow) 1740Debug.Assert(_readerOptions.CommentHandling == JsonCommentHandling.Skip); 1786if (_readerOptions.CommentHandling == JsonCommentHandling.Allow && first == JsonConstants.Slash) 1840Debug.Assert(_readerOptions.CommentHandling == JsonCommentHandling.Allow);
System\Text\Json\Reader\Utf8JsonReader.MultiSegment.cs (13)
236if (_readerOptions.CommentHandling == JsonCommentHandling.Allow && _tokenType == JsonTokenType.Comment) 404Debug.Assert((_trailingCommaBeforeComment && _readerOptions.CommentHandling == JsonCommentHandling.Allow) || !_trailingCommaBeforeComment); 440case JsonCommentHandling.Disallow: 442case JsonCommentHandling.Allow: 455Debug.Assert(_readerOptions.CommentHandling == JsonCommentHandling.Skip); 1564if (_readerOptions.CommentHandling != JsonCommentHandling.Disallow) 1566if (_readerOptions.CommentHandling == JsonCommentHandling.Allow) 1579Debug.Assert(_readerOptions.CommentHandling == JsonCommentHandling.Skip); 1634if (_readerOptions.CommentHandling == JsonCommentHandling.Allow && first == JsonConstants.Slash) 1688Debug.Assert(_readerOptions.CommentHandling == JsonCommentHandling.Allow); 2194_readerOptions.CommentHandling == JsonCommentHandling.Allow || 2195_readerOptions.CommentHandling == JsonCommentHandling.Skip); 2197if (_readerOptions.CommentHandling == JsonCommentHandling.Allow)
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (2)
274if (reader.CurrentState.Options.CommentHandling == JsonCommentHandling.Allow) 299if (reader.CurrentState.Options.CommentHandling == JsonCommentHandling.Allow)
System\Text\Json\Serialization\JsonSerializerOptions.cs (4)
80private JsonCommentHandling _readCommentHandling; 642/// Thrown when the comment handling enum is set to a value that is not supported (or not within the <see cref="JsonCommentHandling"/> enum range). 647public JsonCommentHandling ReadCommentHandling 658if (value > JsonCommentHandling.Skip)