23 instantiations of JsonArray
Aspire.Dashboard (1)
Otlp\Model\OtlpHelpers.cs (1)
128var a = new JsonArray();
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\BicepProvisioner.cs (1)
499IEnumerable<string> s => new JsonArray(s.Select(s => JsonValue.Create(s)).ToArray()),
ConfigurationSchemaGenerator (3)
ConfigSchemaEmitter.cs (3)
600var enumNode = new JsonArray(); 624propertyNode["type"] = new JsonArray { "number", "string" }; 634propertyNode["oneOf"] = new JsonArray
dotnet-user-jwts (1)
Helpers\JwtAuthenticationSchemeSettings.cs (1)
24[nameof(TokenValidationParameters.ValidAudiences)] = new JsonArray(Audiences.Select(aud => JsonValue.Create(aud)).ToArray()),
Microsoft.Extensions.AI.Abstractions (5)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (2)
669new JsonSchema { Enum = new() { (JsonNode)"NaN", (JsonNode)"Infinity", (JsonNode)"-Infinity" } }, 752JsonArray enumValues = new();
src\Shared\JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (3)
394var requiredArray = new JsonArray(); 425JsonArray anyOfArray = new(); 507var array = new JsonArray();
MSBuild (3)
JsonOutputFormatter.cs (3)
58JsonArray itemArray = new(); 94JsonArray itemArray = new(); 138JsonArray outputArray = new();
System.Text.Json (8)
System\Text\Json\Nodes\JsonArray.cs (4)
81? new JsonArray(jsonElement.Value.Clone(), Options) 82: new JsonArray(Options); 85var jsonArray = new JsonArray(Options) 198JsonValueKind.Array => new JsonArray(element, options),
System\Text\Json\Schema\JsonSchema.cs (2)
203var requiredArray = new JsonArray(); 324var array = new JsonArray();
System\Text\Json\Serialization\Converters\Node\JsonArrayConverter.cs (1)
40return new JsonArray(jElement, options);
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (1)
73node = new JsonArray(element, options);
TestProject.AppHost (1)
TestProgram.cs (1)
152var endpointsJsonArray = new JsonArray();
100 references to JsonArray
Aspire.Dashboard (2)
Otlp\Model\OtlpHelpers.cs (2)
126static JsonArray ConvertArray(ArrayValue value) 128var a = new JsonArray();
ConfigurationSchemaGenerator (2)
ConfigSchemaEmitter.cs (2)
600var enumNode = new JsonArray(); 747case JsonArray array:
dotnet-user-jwts (1)
Helpers\SigningKeysHandler.cs (1)
82var signingKeys = secrets[signkingKeysPropertyName].AsArray();
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
UserJwtsTests.cs (1)
520var signingKeys = secretsJson[SigningKeysHandler.GetSigningKeyPropertyName("test-scheme")].AsArray();
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
179schema[OpenApiSchemaKeywords.NullableKeyword] = openApiSchema.Nullable || (schema[OpenApiSchemaKeywords.TypeKeyword] is JsonArray schemaType && schemaType.GetValues<string>().Contains("null"));
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\Configuration\DidChangeConfigurationNotificationHandler.cs (2)
116var options = await _clientLanguageServerManager.SendRequestAsync<ConfigurationParams, JsonArray>(
Microsoft.Extensions.AI (1)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (1)
221JsonValueKind.Array => JsonArray.Create(element),
Microsoft.Extensions.AI.Abstractions (8)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (2)
633[typeof(JsonArray)] = _ => new JsonSchema { Type = JsonSchemaType.Array }, 752JsonArray enumValues = new();
src\Shared\JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (5)
192public JsonArray? Enum 202private JsonArray? _enum; 394var requiredArray = new JsonArray(); 425JsonArray anyOfArray = new(); 507var array = new JsonArray();
Utilities\AIJsonUtilities.Schema.cs (1)
357if (ctx.TypeInfo.NumberHandling is not JsonNumberHandling.Strict && schema["type"] is JsonArray typeArray)
Microsoft.Extensions.AI.Abstractions.Tests (2)
test\Shared\JsonSchemaExporter\TestTypes.cs (2)
105yield return new TestData<JsonArray>([1, 2, 3], """{"type":["array","null"]}"""); 1207[JsonSerializable(typeof(JsonArray))]
Microsoft.ML.AutoML.SourceGenerator (1)
SearchSpaceGenerator.cs (1)
40var searchSpaceJArray = jNode["search_space"].AsArray();
MSBuild (3)
JsonOutputFormatter.cs (3)
58JsonArray itemArray = new(); 94JsonArray itemArray = new(); 138JsonArray outputArray = new();
Shared.Tests (2)
JsonSchemaExporter\TestTypes.cs (2)
105yield return new TestData<JsonArray>([1, 2, 3], """{"type":["array","null"]}"""); 1207[JsonSerializable(typeof(JsonArray))]
System.Text.Json (73)
System\Text\Json\Nodes\JsonArray.cs (21)
16/// It is safe to perform multiple concurrent read operations on a <see cref="JsonArray"/>, 29/// Initializes a new instance of the <see cref="JsonArray"/> class that is empty. 35/// Initializes a new instance of the <see cref="JsonArray"/> class that contains items from the specified params array. 38/// <param name="items">The items to add to the new <see cref="JsonArray"/>.</param> 45/// Initializes a new instance of the <see cref="JsonArray"/> class that contains items from the specified params span. 48/// <param name="items">The items to add to the new <see cref="JsonArray"/>.</param> 55/// Initializes a new instance of the <see cref="JsonArray"/> class that contains items from the specified array. 57/// <param name="items">The items to add to the new <see cref="JsonArray"/>.</param> 64/// Initializes a new instance of the <see cref="JsonArray"/> class that contains items from the specified span. 66/// <param name="items">The items to add to the new <see cref="JsonArray"/>.</param> 85var jsonArray = new JsonArray(Options) 107case JsonArray array: 183/// Initializes a new instance of the <see cref="JsonArray"/> class that contains items from the specified <see cref="JsonElement"/>. 186/// The new instance of the <see cref="JsonArray"/> class that contains items from the specified <see cref="JsonElement"/>. 193public static JsonArray? Create(JsonElement element, JsonNodeOptions? options = null) 210/// Adds an object to the end of the <see cref="JsonArray"/>. 214/// The object to be added to the end of the <see cref="JsonArray"/>. 349private readonly JsonArray _node; 351public DebugView(JsonArray node) 401JsonArray jsonArray = (JsonArray)Value;
System\Text\Json\Nodes\JsonArray.IList.cs (17)
12/// Gets the number of elements contained in the <see cref="JsonArray"/>. 17/// Adds a <see cref="JsonNode"/> to the end of the <see cref="JsonArray"/>. 20/// The <see cref="JsonNode"/> to be added to the end of the <see cref="JsonArray"/>. 30/// Removes all elements from the <see cref="JsonArray"/>. 52/// Determines whether an element is in the <see cref="JsonArray"/>. 54/// <param name="item">The object to locate in the <see cref="JsonArray"/>.</param> 56/// <see langword="true"/> if <paramref name="item"/> is found in the <see cref="JsonArray"/>; otherwise, <see langword="false"/>. 61/// The object to locate in the <see cref="JsonArray"/>. 63/// <param name="item">The <see cref="JsonNode"/> to locate in the <see cref="JsonArray"/>.</param> 70/// Inserts an element into the <see cref="JsonArray"/> at the specified index. 84/// Removes the first occurrence of a specific <see cref="JsonNode"/> from the <see cref="JsonArray"/>. 87/// The <see cref="JsonNode"/> to remove from the <see cref="JsonArray"/>. 104/// Removes the element at the specified index of the <see cref="JsonArray"/>. 125/// from <see cref="JsonArray"/>. The Array must have zero-based indexing.</param> 142/// Returns an enumerator that iterates through the <see cref="JsonArray"/>. 148/// Returns an enumerator that iterates through the <see cref="JsonArray"/>. 151/// A <see cref="IEnumerator"/> for the <see cref="JsonArray"/>.
System\Text\Json\Nodes\JsonNode.cs (17)
53/// Casts to the derived <see cref="JsonArray"/> type. 56/// A <see cref="JsonArray"/>. 59/// The node is not a <see cref="JsonArray"/>. 61public JsonArray AsArray() 63JsonArray? jArray = this as JsonArray; 67ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonArray)); 118/// A parent can either be a <see cref="JsonObject"/> or a <see cref="JsonArray"/>. 208/// The current <see cref="JsonNode"/> is not a <see cref="JsonArray"/> or <see cref="JsonObject"/>. 218ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonArray), nameof(JsonObject)); 223ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(JsonArray), nameof(JsonObject)); 282/// Returns index of the current node from the parent <see cref="JsonArray" />. 285/// The current parent is not a <see cref="JsonArray"/>. 289JsonArray? parentArray = _parent as JsonArray; 293ThrowHelper.ThrowInvalidOperationException_NodeParentWrongType(nameof(JsonArray)); 337case JsonArray jsonArray:
System\Text\Json\Nodes\JsonObject.cs (3)
174case JsonArray: 362JsonArray jsonArray = (JsonArray)Value;
System\Text\Json\Schema\JsonSchema.cs (5)
77public JsonArray? Enum { get => _enum; set { VerifyMutable(); _enum = value; } } 78private JsonArray? _enum; 203var requiredArray = new JsonArray(); 234JsonArray anyOfArray = []; 324var array = new JsonArray();
System\Text\Json\Serialization\Converters\Node\JsonArrayConverter.cs (4)
10internal sealed class JsonArrayConverter : JsonConverter<JsonArray?> 12public override void Write(Utf8JsonWriter writer, JsonArray? value, JsonSerializerOptions options) 23public override JsonArray? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 37public static JsonArray ReadList(ref Utf8JsonReader reader, JsonNodeOptions? options = null)
System\Text\Json\Serialization\Converters\Node\JsonNodeConverterFactory.cs (1)
24if (typeof(JsonArray) == typeToConvert)
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (1)
510JsonArray enumValues = [];
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (4)
129/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="JsonArray"/> values. 132public static JsonConverter<JsonArray?> JsonArrayConverter => s_jsonArrayConverter ??= new JsonArrayConverter(); 133private static JsonConverter<JsonArray?>? s_jsonArrayConverter; 157/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="JsonArray"/> values.
TestProject.AppHost (1)
TestProgram.cs (1)
152var endpointsJsonArray = new JsonArray();