23 instantiations of JsonArray
Aspire.Dashboard (1)
Otlp\Model\OtlpHelpers.cs (1)
128
var a = new
JsonArray
();
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\BicepProvisioner.cs (1)
499
IEnumerable<string> s => new
JsonArray
(s.Select(s => JsonValue.Create(s)).ToArray()),
ConfigurationSchemaGenerator (3)
ConfigSchemaEmitter.cs (3)
600
var enumNode = new
JsonArray
();
624
propertyNode["type"] = new
JsonArray
{ "number", "string" };
634
propertyNode["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)
669
new JsonSchema { Enum =
new
() { (JsonNode)"NaN", (JsonNode)"Infinity", (JsonNode)"-Infinity" } },
752
JsonArray enumValues =
new
();
src\Shared\JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (3)
394
var requiredArray = new
JsonArray
();
425
JsonArray anyOfArray =
new
();
507
var array = new
JsonArray
();
MSBuild (3)
JsonOutputFormatter.cs (3)
58
JsonArray itemArray =
new
();
94
JsonArray itemArray =
new
();
138
JsonArray outputArray =
new
();
System.Text.Json (8)
System\Text\Json\Nodes\JsonArray.cs (4)
81
? new
JsonArray
(jsonElement.Value.Clone(), Options)
82
: new
JsonArray
(Options);
85
var jsonArray = new
JsonArray
(Options)
198
JsonValueKind.Array => new
JsonArray
(element, options),
System\Text\Json\Schema\JsonSchema.cs (2)
203
var requiredArray = new
JsonArray
();
324
var array = new
JsonArray
();
System\Text\Json\Serialization\Converters\Node\JsonArrayConverter.cs (1)
40
return new
JsonArray
(jElement, options);
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (1)
73
node = new
JsonArray
(element, options);
TestProject.AppHost (1)
TestProgram.cs (1)
152
var endpointsJsonArray = new
JsonArray
();
100 references to JsonArray
Aspire.Dashboard (2)
Otlp\Model\OtlpHelpers.cs (2)
126
static
JsonArray
ConvertArray(ArrayValue value)
128
var
a = new JsonArray();
ConfigurationSchemaGenerator (2)
ConfigSchemaEmitter.cs (2)
600
var
enumNode = new JsonArray();
747
case
JsonArray
array:
dotnet-user-jwts (1)
Helpers\SigningKeysHandler.cs (1)
82
var
signingKeys = secrets[signkingKeysPropertyName].AsArray();
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
UserJwtsTests.cs (1)
520
var
signingKeys = secretsJson[SigningKeysHandler.GetSigningKeyPropertyName("test-scheme")].AsArray();
Microsoft.AspNetCore.OpenApi (1)
Extensions\JsonNodeSchemaExtensions.cs (1)
179
schema[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)
116
var
options = await _clientLanguageServerManager.SendRequestAsync<ConfigurationParams,
JsonArray
>(
Microsoft.Extensions.AI (1)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (1)
221
JsonValueKind.Array =>
JsonArray
.Create(element),
Microsoft.Extensions.AI.Abstractions (8)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (2)
633
[typeof(
JsonArray
)] = _ => new JsonSchema { Type = JsonSchemaType.Array },
752
JsonArray
enumValues = new();
src\Shared\JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (5)
192
public
JsonArray
? Enum
202
private
JsonArray
? _enum;
394
var
requiredArray = new JsonArray();
425
JsonArray
anyOfArray = new();
507
var
array = new JsonArray();
Utilities\AIJsonUtilities.Schema.cs (1)
357
if (ctx.TypeInfo.NumberHandling is not JsonNumberHandling.Strict && schema["type"] is
JsonArray
typeArray)
Microsoft.Extensions.AI.Abstractions.Tests (2)
test\Shared\JsonSchemaExporter\TestTypes.cs (2)
105
yield return new TestData<
JsonArray
>([1, 2, 3], """{"type":["array","null"]}""");
1207
[JsonSerializable(typeof(
JsonArray
))]
Microsoft.ML.AutoML.SourceGenerator (1)
SearchSpaceGenerator.cs (1)
40
var
searchSpaceJArray = jNode["search_space"].AsArray();
MSBuild (3)
JsonOutputFormatter.cs (3)
58
JsonArray
itemArray = new();
94
JsonArray
itemArray = new();
138
JsonArray
outputArray = new();
Shared.Tests (2)
JsonSchemaExporter\TestTypes.cs (2)
105
yield 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>
85
var
jsonArray = new JsonArray(Options)
107
case
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"/>.
193
public 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
"/>.
349
private readonly
JsonArray
_node;
351
public DebugView(
JsonArray
node)
401
JsonArray
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
"/>.
61
public
JsonArray
AsArray()
63
JsonArray
? jArray = this as
JsonArray
;
67
ThrowHelper.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"/>.
218
ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(
JsonArray
), nameof(JsonObject));
223
ThrowHelper.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
"/>.
289
JsonArray
? parentArray = _parent as
JsonArray
;
293
ThrowHelper.ThrowInvalidOperationException_NodeParentWrongType(nameof(
JsonArray
));
337
case
JsonArray
jsonArray:
System\Text\Json\Nodes\JsonObject.cs (3)
174
case
JsonArray
:
362
JsonArray
jsonArray = (
JsonArray
)Value;
System\Text\Json\Schema\JsonSchema.cs (5)
77
public
JsonArray
? Enum { get => _enum; set { VerifyMutable(); _enum = value; } }
78
private
JsonArray
? _enum;
203
var
requiredArray = new JsonArray();
234
JsonArray
anyOfArray = [];
324
var
array = new JsonArray();
System\Text\Json\Serialization\Converters\Node\JsonArrayConverter.cs (4)
10
internal sealed class JsonArrayConverter : JsonConverter<
JsonArray
?>
12
public override void Write(Utf8JsonWriter writer,
JsonArray
? value, JsonSerializerOptions options)
23
public override
JsonArray
? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
37
public static
JsonArray
ReadList(ref Utf8JsonReader reader, JsonNodeOptions? options = null)
System\Text\Json\Serialization\Converters\Node\JsonNodeConverterFactory.cs (1)
24
if (typeof(
JsonArray
) == typeToConvert)
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (1)
510
JsonArray
enumValues = [];
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (4)
129
/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="
JsonArray
"/> values.
132
public static JsonConverter<
JsonArray
?> JsonArrayConverter => s_jsonArrayConverter ??= new JsonArrayConverter();
133
private 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)
152
var
endpointsJsonArray = new JsonArray();