39 instantiations of JsonArray
Aspire.Dashboard (1)
Otlp\Model\OtlpHelpers.cs (1)
138
var a = new
JsonArray
();
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\BicepProvisioner.cs (1)
482
IEnumerable<string> s => new
JsonArray
(s.Select(s => JsonValue.Create(s)).ToArray()),
ConfigurationSchemaGenerator (3)
ConfigSchemaEmitter.cs (3)
596
var enumNode = new
JsonArray
();
620
propertyNode["type"] = new
JsonArray
{ "number", "string" };
630
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.AspNetCore.OpenApi (1)
Schemas\OpenApiJsonSchema.Helpers.cs (1)
142
var array = new
JsonArray
();
Microsoft.Extensions.AI (1)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (1)
184
{ "required", new
JsonArray
("data") },
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
();
Microsoft.Extensions.AI.Evaluation.Safety (9)
ContentSafetyServicePayloadUtilities.cs (9)
153
["UserTextList"] = new
JsonArray
([.. userTextListStrings]),
237
["UserTextList"] = new
JsonArray
([.. userTextListStrings]),
243
payload["MetricList"] = new
JsonArray
([.. metricNames]);
289
["content"] = new
JsonArray
([.. contents])
304
["content"] = new
JsonArray
([.. contents]),
313
["content"] = new
JsonArray
([.. contents]),
365
new
JsonArray
(
368
["messages"] = new
JsonArray
([.. turns.SelectMany(GetMessages)]),
375
payload["MetricList"] = new
JsonArray
([.. metricNames]);
MSBuild (3)
JsonOutputFormatter.cs (3)
58
JsonArray itemArray =
new
();
94
JsonArray itemArray =
new
();
138
JsonArray outputArray =
new
();
Shared (5)
JsonSchemaExporter\JsonSchemaExporter.cs (2)
669
new JsonSchema { Enum =
new
() { (JsonNode)"NaN", (JsonNode)"Infinity", (JsonNode)"-Infinity" } },
752
JsonArray enumValues =
new
();
JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (3)
394
var requiredArray = new
JsonArray
();
425
JsonArray anyOfArray =
new
();
507
var array = new
JsonArray
();
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)
166
var endpointsJsonArray = new
JsonArray
();
128 references to JsonArray
Aspire.Dashboard (2)
Otlp\Model\OtlpHelpers.cs (2)
136
static
JsonArray
ConvertArray(ArrayValue value)
138
var
a = new JsonArray();
ConfigurationSchemaGenerator (2)
ConfigSchemaEmitter.cs (2)
596
var
enumNode = new JsonArray();
759
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)
610
var
signingKeys = secretsJson[SigningKeysHandler.GetSigningKeyPropertyName("test-scheme")].AsArray();
Microsoft.AspNetCore.Http.Extensions.Tests (1)
ValidationsGenerator\ValidationsGeneratorTestBase.cs (1)
51
MetadataReference.CreateFromFile(typeof(System.Text.Json.Nodes.
JsonArray
).Assembly.Location),
Microsoft.AspNetCore.JsonPatch.SystemTextJson (7)
Adapters\AdapterFactory.cs (1)
34
JsonArray
=> new ListAdapter(),
Helpers\GenericListOrJsonArrayUtilities.cs (6)
19
if (list is
JsonArray
array)
33
else if (list is
JsonArray
array)
50
if (list is
JsonArray
jsonArray)
64
else if (list is
JsonArray
array)
80
else if (list is
JsonArray
array)
96
else if (list is
JsonArray
array)
Microsoft.AspNetCore.OpenApi (2)
Extensions\JsonNodeSchemaExtensions.cs (1)
472
if (jsonNode is not
JsonArray
jsonArray)
Schemas\OpenApiJsonSchema.Helpers.cs (1)
142
var
array = new JsonArray();
Microsoft.AspNetCore.OpenApi.SourceGenerators.Tests (1)
SnapshotTestHelper.cs (1)
50
MetadataReference.CreateFromFile(typeof(System.Text.Json.Nodes.
JsonArray
).Assembly.Location),
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\Configuration\DidChangeConfigurationNotificationHandler.cs (2)
123
var
options = await _clientLanguageServerManager.SendRequestAsync<ConfigurationParams,
JsonArray
>(
Microsoft.Extensions.AI (1)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (1)
244
JsonValueKind.Array =>
JsonArray
.Create(element),
Microsoft.Extensions.AI.Abstractions (14)
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.Defaults.cs (1)
90
[JsonSerializable(typeof(
JsonArray
))]
Utilities\AIJsonUtilities.Schema.Create.cs (3)
75
JsonArray
? requiredProperties = null;
293
if (required is not
JsonArray
{ } requiredArray || requiredArray.Count != propertiesObj.Count)
393
if (ctx.TypeInfo.NumberHandling is not JsonNumberHandling.Strict && schema["type"] is
JsonArray
{ Count: 2 } typeArray)
Utilities\AIJsonUtilities.Schema.Transform.cs (3)
103
if (schemaObj.TryGetPropertyValue(combinatorKeyword, out JsonNode? combinatorSchema) && combinatorSchema is
JsonArray
combinatorArray)
130
JsonArray
requiredProps = [];
141
typeSchema is
JsonArray
typeArray)
Microsoft.Extensions.AI.Abstractions.Tests (4)
test\Shared\JsonSchemaExporter\TestTypes.cs (2)
109
yield return new TestData<
JsonArray
>([(JsonNode)1, (JsonNode)2, (JsonNode)3], """{"type":["array","null"]}""");
1238
[JsonSerializable(typeof(
JsonArray
))]
Utilities\AIJsonUtilitiesTests.cs (2)
757
Assert.Equal(((
JsonArray
)schemaObj["required"]!).Count, ((JsonObject)props!).Count);
760
if (schemaObj.TryGetPropertyValue("type", out JsonNode? type) && type is
JsonArray
typeArray)
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 (7)
JsonSchemaExporter\JsonSchemaExporter.cs (2)
633
[typeof(
JsonArray
)] = _ => new JsonSchema { Type = JsonSchemaType.Array },
752
JsonArray
enumValues = new();
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();
Shared.Tests (2)
JsonSchemaExporter\TestTypes.cs (2)
109
yield return new TestData<
JsonArray
>([(JsonNode)1, (JsonNode)2, (JsonNode)3], """{"type":["array","null"]}""");
1238
[JsonSerializable(typeof(
JsonArray
))]
System.Text.Json (76)
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
"/>.
346
private readonly
JsonArray
_node;
348
public DebugView(
JsonArray
node)
398
JsonArray
jsonArray = (
JsonArray
)Value;
System\Text\Json\Nodes\JsonArray.IList.cs (20)
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
"/>.
121
/// <returns>The number of elements removed from the <see cref="
JsonArray
"/>.</returns>
144
/// Removes a range of elements from the <see cref="
JsonArray
"/>.
152
/// <paramref name="index"/> and <paramref name="count"/> do not denote a valid range of elements in the <see cref="
JsonArray
"/>.
194
/// from <see cref="
JsonArray
"/>. The Array must have zero-based indexing.</param>
211
/// Returns an enumerator that iterates through the <see cref="
JsonArray
"/>.
217
/// Returns an enumerator that iterates through the <see cref="
JsonArray
"/>.
220
/// 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)
168
case
JsonArray
:
348
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)
502
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)
166
var
endpointsJsonArray = new JsonArray();