42 instantiations of JsonObject
dotnet-user-jwts (5)
Helpers\JwtAuthenticationSchemeSettings.cs (4)
22
var settingsObject = new
JsonObject
38
authentication.Add(SchemesKey, new
JsonObject
46
config[AuthenticationKey] = new
JsonObject
48
[SchemesKey] = new
JsonObject
Helpers\SigningKeysHandler.cs (1)
75
secrets ??= new
JsonObject
();
Microsoft.AspNetCore.OpenApi (18)
Extensions\JsonObjectSchemaExtensions.cs (1)
273
var mappings = new
JsonObject
();
Schemas\JsonSchemaMapper\JsonSchemaMapper.cs (11)
123
(paramSchemas ??=
new
()).Add(parameterInfo.Name, paramSchema);
243
return new
JsonObject
{ [RefPropertyName] = existingPointer };
319
var typeDiscriminatorPropertySchema = new
JsonObject
{ [ConstPropertyName] = discriminatorNodeValue };
360
(JsonNode)new
JsonObject
{ [TypePropertyName] = MapSchemaType(schemaType) },
361
(JsonNode)new
JsonObject
411
(properties ??=
new
()).Add(typeDiscriminator.Value);
481
(properties ??=
new
()).Add(property.Name, propertySchema);
512
(properties ??=
new
()).Add(typeDiscriminator.Value);
525
new
JsonObject
541
(properties ??=
new
()).Add(typeDiscriminator.Value);
733
var schema = new
JsonObject
();
Services\Schemas\OpenApiSchemaService.cs (1)
51
schema[OpenApiSchemaKeywords.ItemsKeyword] = new
JsonObject
Services\Schemas\OpenApiSchemaStore.cs (5)
20
[new OpenApiSchemaKey(typeof(IFormFile), null)] = new
JsonObject
{ ["type"] = "string", ["format"] = "binary" },
21
[new OpenApiSchemaKey(typeof(IFormFileCollection), null)] = new
JsonObject
24
["items"] = new
JsonObject
{ ["type"] = "string", ["format"] = "binary" }
26
[new OpenApiSchemaKey(typeof(Stream), null)] = new
JsonObject
{ ["type"] = "string", ["format"] = "binary" },
27
[new OpenApiSchemaKey(typeof(PipeReader), null)] = new
JsonObject
{ ["type"] = "string", ["format"] = "binary" },
MSBuild (10)
JsonOutputFormatter.cs (9)
21
private readonly JsonNode _topLevelNode = new
JsonObject
();
37
JsonNode propertiesNode = new
JsonObject
();
55
JsonNode itemsNode = new
JsonObject
();
61
JsonObject jsonItem =
new
();
91
JsonObject itemsNode =
new
();
97
JsonObject jsonItem =
new
();
132
JsonObject targetResultsNode =
new
();
136
JsonObject targetResults =
new
();
141
JsonObject jsonItem =
new
();
XMake.cs (1)
4629
var jsonNode = new
JsonObject
();
System.Text.Json (7)
System\Text\Json\Nodes\JsonObject.cs (4)
65
JsonValueKind.Object => new
JsonObject
(element, options),
88
? new
JsonObject
(jsonElement.Value.Clone(), Options)
89
: new
JsonObject
(Options);
93
var jObject = new
JsonObject
(Options)
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (1)
69
node = new
JsonObject
(element, options);
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (2)
14
jsonTypeInfo.CreateObjectForExtensionDataProperty = () => new
JsonObject
(options.GetNodeOptions());
64
JsonObject jObject = new
JsonObject
(jElement, options);
WasmAppBuilder (2)
WasmAppBuilderBaseTask.cs (2)
121
JsonObject wasmHostProperties = runtimeOptionsObject.GetOrCreate<JsonObject>("wasmHostProperties", () => new
JsonObject
());
141
var hostConfigObject = new
JsonObject
();
154 references to JsonObject
dotnet-user-jwts (11)
Helpers\JwtAuthenticationSchemeSettings.cs (9)
19
var
config = JsonSerializer.Deserialize<
JsonObject
>(reader, JwtSerializerOptions.Default);
22
var
settingsObject = new JsonObject
28
if (config[AuthenticationKey] is
JsonObject
authentication)
30
if (authentication[SchemesKey] is
JsonObject
schemes)
67
var
config = JsonSerializer.Deserialize<
JsonObject
>(reader, JwtSerializerOptions.Default);
70
if (config[AuthenticationKey] is
JsonObject
authentication &&
71
authentication[SchemesKey] is
JsonObject
schemes)
Helpers\SigningKeysHandler.cs (2)
65
JsonObject
secrets = null;
71
secrets = JsonSerializer.Deserialize<
JsonObject
>(secretsFileStream, JwtSerializerOptions.Default);
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (15)
UserJwtsTests.cs (15)
75
var
appSettings = JsonSerializer.Deserialize<
JsonObject
>(File.ReadAllText(appsettings));
78
appSettings = JsonSerializer.Deserialize<
JsonObject
>(File.ReadAllText(appsettings));
210
var
secretsJson = await JsonSerializer.DeserializeAsync<
JsonObject
>(openStream);
429
var
secretsJson = await JsonSerializer.DeserializeAsync<
JsonObject
>(openStream);
457
var
secretsJson = await JsonSerializer.DeserializeAsync<
JsonObject
>(openStream);
496
var
secretsJson = await JsonSerializer.DeserializeAsync<
JsonObject
>(openStream);
518
var
secretsJson = await JsonSerializer.DeserializeAsync<
JsonObject
>(openStream);
540
var
secretsJson = await JsonSerializer.DeserializeAsync<
JsonObject
>(openStream);
Microsoft.AspNetCore.OpenApi (42)
Extensions\JsonObjectSchemaExtensions.cs (13)
50
/// Note that this method targets <see cref="
JsonObject
"/> and not <see cref="OpenApiSchema"/> because it is
72
/// <param name="schema">The <see cref="
JsonObject
"/> produced by the underlying schema generator.</param>
74
internal static void ApplyValidationAttributes(this
JsonObject
schema, IEnumerable<Attribute> validationAttributes)
134
/// Note that this method targets <see cref="
JsonObject
"/> and not <see cref="OpenApiSchema"/> because
138
/// <param name="schema">The <see cref="
JsonObject
"/> produced by the underlying schema generator.</param>
140
internal static void ApplyPrimitiveTypesAndFormats(this
JsonObject
schema, Type type)
153
/// <param name="schema">The <see cref="
JsonObject
"/> produced by the underlying schema generator.</param>
155
internal static void ApplyRouteConstraints(this
JsonObject
schema, IEnumerable<IRouteConstraint> constraints)
229
/// <param name="schema">The <see cref="
JsonObject
"/> produced by the underlying schema generator.</param>
231
internal static void ApplyParameterInfo(this
JsonObject
schema, ApiParameterDescription parameterDescription)
267
/// <param name="schema">The <see cref="
JsonObject
"/> produced by the underlying schema generator.</param>
269
internal static void ApplyPolymorphismOptions(this
JsonObject
schema, JsonSchemaGenerationContext context)
273
var
mappings = new JsonObject();
Schemas\JsonSchemaMapper\JsonSchemaMapper.cs (23)
39
/// <returns>A new <see cref="
JsonObject
"/> instance defining the JSON schema for <paramref name="type"/>.</returns>
42
public static
JsonObject
GetJsonSchema(this JsonSerializerOptions options, Type type, JsonSchemaMapperConfiguration? configuration = null)
68
/// <returns>A new <see cref="
JsonObject
"/> instance defining the JSON schema for <paramref name="method"/>.</returns>
71
public static
JsonObject
GetJsonSchema(this JsonSerializerOptions options, MethodBase method, JsonSchemaMapperConfiguration? configuration = null)
93
JsonObject
? paramSchemas = null;
113
JsonObject
paramSchema = MapJsonSchemaCore(
133
public static
JsonObject
GetJsonSchema(this JsonSerializerOptions options, ParameterInfo parameterInfo, JsonSchemaMapperConfiguration? configuration = null)
180
/// <returns>A new <see cref="
JsonObject
"/> instance defining the JSON schema for <paramref name="typeInfo"/>.</returns>
183
public static
JsonObject
GetJsonSchema(this JsonTypeInfo typeInfo, JsonSchemaMapperConfiguration? configuration = null)
210
private static
JsonObject
MapJsonSchemaCore(
251
JsonObject
schema;
255
JsonObject
? properties = null;
257
JsonObject
? arrayItems = null;
319
var
typeDiscriminatorPropertySchema = new JsonObject { [ConstPropertyName] = discriminatorNodeValue };
326
JsonObject
derivedSchema = MapJsonSchemaCore(
466
JsonObject
propertySchema = MapJsonSchemaCore(
518
JsonObject
elementSchema = MapJsonSchemaCore(ref state, elementTypeInfo, parentType, parentPropertyInfo, parentParameterInfo);
707
public readonly void HandleGenerationCallback(
JsonObject
schema, JsonTypeInfo typeInfo, Type? parentType, JsonPropertyInfo? propertyInfo, ParameterInfo? parameterInfo)
717
private static
JsonObject
CreateSchemaDocument(
724
JsonObject
? properties = null,
726
JsonObject
? arrayItems = null,
733
var
schema = new JsonObject();
934
[typeof(
JsonObject
)] = new(JsonSchemaType.Object),
Schemas\JsonSchemaMapper\JsonSchemaMapperConfiguration.cs (1)
74
public Action<JsonSchemaGenerationContext,
JsonObject
>? OnSchemaGenerated { get; init; }
Services\Schemas\OpenApiSchemaService.cs (1)
99
private
JsonObject
CreateSchema(OpenApiSchemaKey key)
Services\Schemas\OpenApiSchemaStore.cs (4)
17
private readonly ConcurrentDictionary<OpenApiSchemaKey,
JsonObject
> _schemas = new()
35
/// <returns>A <see cref="
JsonObject
" /> representing the JSON schema associated with the key.</returns>
36
public
JsonObject
GetOrAdd(OpenApiSchemaKey key, Func<OpenApiSchemaKey,
JsonObject
> valueFactory)
MSBuild (7)
JsonOutputFormatter.cs (6)
61
JsonObject
jsonItem = new();
91
JsonObject
itemsNode = new();
97
JsonObject
jsonItem = new();
132
JsonObject
targetResultsNode = new();
136
JsonObject
targetResults = new();
141
JsonObject
jsonItem = new();
XMake.cs (1)
4629
var
jsonNode = new JsonObject();
System.Text.Json (71)
System\Text\Json\Nodes\JsonArray.cs (2)
100
case null or
JsonObject
:
394
if (Value is
JsonObject
jsonObject)
System\Text\Json\Nodes\JsonNode.cs (14)
66
/// Casts to the derived <see cref="
JsonObject
"/> type.
69
/// A <see cref="
JsonObject
"/>.
72
/// The node is not a <see cref="
JsonObject
"/>.
74
public
JsonObject
AsObject()
76
JsonObject
? jObject = this as
JsonObject
;
80
ThrowHelper.ThrowInvalidOperationException_NodeWrongType(nameof(
JsonObject
));
110
/// A parent can either be a <see cref="
JsonObject
"/> or a <see cref="JsonArray"/>.
223
/// The current <see cref="JsonNode"/> is not a <see cref="
JsonObject
"/>.
256
/// The current parent is not a <see cref="
JsonObject
"/>.
260
JsonObject
? parentObject = _parent as
JsonObject
;
264
ThrowHelper.ThrowInvalidOperationException_NodeParentWrongType(nameof(
JsonObject
));
318
case
JsonObject
jsonObject:
System\Text\Json\Nodes\JsonNodeOptions.cs (1)
12
/// Specifies whether property names on <see cref="
JsonObject
"/> are case insensitive.
System\Text\Json\Nodes\JsonObject.cs (12)
14
/// It's safe to perform multiple concurrent read operations on a <see cref="
JsonObject
"/>,
24
/// Initializes a new instance of the <see cref="
JsonObject
"/> class that is empty.
30
/// Initializes a new instance of the <see cref="
JsonObject
"/> class that contains the specified <paramref name="properties"/>.
52
/// Initializes a new instance of the <see cref="
JsonObject
"/> class that contains properties from the specified <see cref="JsonElement"/>.
55
/// The new instance of the <see cref="
JsonObject
"/> class that contains properties from the specified <see cref="JsonElement"/>.
59
/// <returns>A <see cref="
JsonObject
"/>.</returns>
60
public static
JsonObject
? Create(JsonElement element, JsonNodeOptions? options = null)
93
var
jObject = new JsonObject(Options)
171
case
JsonObject
jsonObject:
255
private readonly
JsonObject
_node;
257
public DebugView(
JsonObject
node)
308
if (Value is
JsonObject
jsonObject)
System\Text\Json\Nodes\JsonObject.IDictionary.cs (25)
16
/// Adds an element with the provided property name and value to the <see cref="
JsonObject
"/>.
24
/// An element with the same property name already exists in the <see cref="
JsonObject
"/>.
33
/// Adds the specified property to the <see cref="
JsonObject
"/>.
36
/// The KeyValuePair structure representing the property name and value to add to the <see cref="
JsonObject
"/>.
39
/// An element with the same property name already exists in the <see cref="
JsonObject
"/>.
47
/// Removes all elements from the <see cref="
JsonObject
"/>.
68
/// Determines whether the <see cref="
JsonObject
"/> contains an element with the specified property name.
70
/// <param name="propertyName">The property name to locate in the <see cref="
JsonObject
"/>.</param>
72
/// <see langword="true"/> if the <see cref="
JsonObject
"/> contains an element with the specified property name; otherwise, <see langword="false"/>.
80
/// Gets the number of elements contained in <see cref="
JsonObject
"/>.
85
/// Removes the element with the specified property name from the <see cref="
JsonObject
"/>.
111
/// Determines whether the <see cref="
JsonObject
"/> contains a specific property name and <see cref="JsonNode"/> reference.
113
/// <param name="item">The element to locate in the <see cref="
JsonObject
"/>.</param>
115
/// <see langword="true"/> if the <see cref="
JsonObject
"/> contains an element with the property name; otherwise, <see langword="false"/>.
120
/// Copies the elements of the <see cref="
JsonObject
"/> to an array of type KeyValuePair starting at the specified array index.
123
/// The one-dimensional Array that is the destination of the elements copied from <see cref="
JsonObject
"/>.
139
/// Returns an enumerator that iterates through the <see cref="
JsonObject
"/>.
142
/// An enumerator that iterates through the <see cref="
JsonObject
"/>.
147
/// Removes a key and value from the <see cref="
JsonObject
"/>.
150
/// The KeyValuePair structure representing the property name and value to remove from the <see cref="
JsonObject
"/>.
158
/// Gets a collection containing the property names in the <see cref="
JsonObject
"/>.
163
/// Gets a collection containing the property values in the <see cref="
JsonObject
"/>.
176
/// <see langword="true"/> if the <see cref="
JsonObject
"/> contains an element with the specified property name; otherwise, <see langword="false"/>.
189
/// Returns an enumerator that iterates through the <see cref="
JsonObject
"/>.
192
/// An enumerator that iterates through the <see cref="
JsonObject
"/>.
System\Text\Json\Serialization\Attributes\JsonExtensionDataAttribute.cs (1)
7
/// When placed on a property or field of type <see cref="System.Text.Json.Nodes.
JsonObject
"/> or
System\Text\Json\Serialization\Converters\Node\JsonNodeConverterFactory.cs (1)
19
if (typeof(
JsonObject
) == typeToConvert)
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (8)
10
internal sealed class JsonObjectConverter : JsonConverter<
JsonObject
?>
27
Debug.Assert(obj is
JsonObject
);
28
JsonObject
jObject = (
JsonObject
)obj;
36
public override void Write(Utf8JsonWriter writer,
JsonObject
? value, JsonSerializerOptions options)
47
public override
JsonObject
? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
61
public static
JsonObject
ReadObject(ref Utf8JsonReader reader, JsonNodeOptions? options)
64
JsonObject
jObject = new JsonObject(jElement, options);
System\Text\Json\Serialization\JsonConverterOfT.cs (1)
461
Debug.Assert(Type == typeof(Nodes.
JsonObject
));
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (2)
449
if (jsonNode is
JsonObject
jsonObject)
502
JsonObject
=> JsonValueKind.Object,
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Converters.cs (3)
150
/// Returns a <see cref="JsonConverter{T}"/> instance that converts <see cref="
JsonObject
"/> values.
153
public static JsonConverter<
JsonObject
?> JsonObjectConverter => s_jsonObjectConverter ??= new JsonObjectConverter();
154
private static JsonConverter<
JsonObject
?>? s_jsonObjectConverter;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
884
Debug.Assert(propValue is Nodes.
JsonObject
);
WasmAppBuilder (8)
JsonExtensions.cs (1)
11
public static T GetOrCreate<T>(this
JsonObject
json, string name, Func<JsonNode> creator) where T : JsonNode
wasi\WasiAppBuilder.cs (1)
134
protected override void AddToRuntimeConfig(
JsonObject
wasmHostProperties, JsonArray runtimeArgsArray, JsonArray perHostConfigs)
WasmAppBuilderBaseTask.cs (6)
114
JsonObject
? rootObject = rootNode.AsObject();
116
|| !(runtimeOptionsNode is
JsonObject
runtimeOptionsObject))
121
JsonObject
wasmHostProperties = runtimeOptionsObject.GetOrCreate<
JsonObject
>("wasmHostProperties", () => new JsonObject());
141
var
hostConfigObject = new JsonObject();
166
protected virtual void AddToRuntimeConfig(
JsonObject
wasmHostProperties, JsonArray runtimeArgsArray, JsonArray perHostConfigs)