42 instantiations of JsonObject
dotnet-user-jwts (5)
Helpers\JwtAuthenticationSchemeSettings.cs (4)
22var settingsObject = new JsonObject 38authentication.Add(SchemesKey, new JsonObject 46config[AuthenticationKey] = new JsonObject 48[SchemesKey] = new JsonObject
Helpers\SigningKeysHandler.cs (1)
75secrets ??= new JsonObject();
Microsoft.AspNetCore.OpenApi (18)
Extensions\JsonObjectSchemaExtensions.cs (1)
273var mappings = new JsonObject();
Schemas\JsonSchemaMapper\JsonSchemaMapper.cs (11)
123(paramSchemas ??= new()).Add(parameterInfo.Name, paramSchema); 243return new JsonObject { [RefPropertyName] = existingPointer }; 319var 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); 525new JsonObject 541(properties ??= new()).Add(typeDiscriminator.Value); 733var schema = new JsonObject();
Services\Schemas\OpenApiSchemaService.cs (1)
51schema[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)
21private readonly JsonNode _topLevelNode = new JsonObject(); 37JsonNode propertiesNode = new JsonObject(); 55JsonNode itemsNode = new JsonObject(); 61JsonObject jsonItem = new(); 91JsonObject itemsNode = new(); 97JsonObject jsonItem = new(); 132JsonObject targetResultsNode = new(); 136JsonObject targetResults = new(); 141JsonObject jsonItem = new();
XMake.cs (1)
4629var jsonNode = new JsonObject();
System.Text.Json (7)
System\Text\Json\Nodes\JsonObject.cs (4)
65JsonValueKind.Object => new JsonObject(element, options), 88? new JsonObject(jsonElement.Value.Clone(), Options) 89: new JsonObject(Options); 93var jObject = new JsonObject(Options)
System\Text\Json\Serialization\Converters\Node\JsonNodeConverter.cs (1)
69node = new JsonObject(element, options);
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (2)
14jsonTypeInfo.CreateObjectForExtensionDataProperty = () => new JsonObject(options.GetNodeOptions()); 64JsonObject jObject = new JsonObject(jElement, options);
WasmAppBuilder (2)
WasmAppBuilderBaseTask.cs (2)
121JsonObject wasmHostProperties = runtimeOptionsObject.GetOrCreate<JsonObject>("wasmHostProperties", () => new JsonObject()); 141var hostConfigObject = new JsonObject();
154 references to JsonObject
dotnet-user-jwts (11)
Helpers\JwtAuthenticationSchemeSettings.cs (9)
19var config = JsonSerializer.Deserialize<JsonObject>(reader, JwtSerializerOptions.Default); 22var settingsObject = new JsonObject 28if (config[AuthenticationKey] is JsonObject authentication) 30if (authentication[SchemesKey] is JsonObject schemes) 67var config = JsonSerializer.Deserialize<JsonObject>(reader, JwtSerializerOptions.Default); 70if (config[AuthenticationKey] is JsonObject authentication && 71authentication[SchemesKey] is JsonObject schemes)
Helpers\SigningKeysHandler.cs (2)
65JsonObject secrets = null; 71secrets = JsonSerializer.Deserialize<JsonObject>(secretsFileStream, JwtSerializerOptions.Default);
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (15)
UserJwtsTests.cs (15)
75var appSettings = JsonSerializer.Deserialize<JsonObject>(File.ReadAllText(appsettings)); 78appSettings = JsonSerializer.Deserialize<JsonObject>(File.ReadAllText(appsettings)); 210var secretsJson = await JsonSerializer.DeserializeAsync<JsonObject>(openStream); 429var secretsJson = await JsonSerializer.DeserializeAsync<JsonObject>(openStream); 457var secretsJson = await JsonSerializer.DeserializeAsync<JsonObject>(openStream); 496var secretsJson = await JsonSerializer.DeserializeAsync<JsonObject>(openStream); 518var secretsJson = await JsonSerializer.DeserializeAsync<JsonObject>(openStream); 540var 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> 74internal 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> 140internal static void ApplyPrimitiveTypesAndFormats(this JsonObject schema, Type type) 153/// <param name="schema">The <see cref="JsonObject"/> produced by the underlying schema generator.</param> 155internal static void ApplyRouteConstraints(this JsonObject schema, IEnumerable<IRouteConstraint> constraints) 229/// <param name="schema">The <see cref="JsonObject"/> produced by the underlying schema generator.</param> 231internal static void ApplyParameterInfo(this JsonObject schema, ApiParameterDescription parameterDescription) 267/// <param name="schema">The <see cref="JsonObject"/> produced by the underlying schema generator.</param> 269internal static void ApplyPolymorphismOptions(this JsonObject schema, JsonSchemaGenerationContext context) 273var 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> 42public 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> 71public static JsonObject GetJsonSchema(this JsonSerializerOptions options, MethodBase method, JsonSchemaMapperConfiguration? configuration = null) 93JsonObject? paramSchemas = null; 113JsonObject paramSchema = MapJsonSchemaCore( 133public 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> 183public static JsonObject GetJsonSchema(this JsonTypeInfo typeInfo, JsonSchemaMapperConfiguration? configuration = null) 210private static JsonObject MapJsonSchemaCore( 251JsonObject schema; 255JsonObject? properties = null; 257JsonObject? arrayItems = null; 319var typeDiscriminatorPropertySchema = new JsonObject { [ConstPropertyName] = discriminatorNodeValue }; 326JsonObject derivedSchema = MapJsonSchemaCore( 466JsonObject propertySchema = MapJsonSchemaCore( 518JsonObject elementSchema = MapJsonSchemaCore(ref state, elementTypeInfo, parentType, parentPropertyInfo, parentParameterInfo); 707public readonly void HandleGenerationCallback(JsonObject schema, JsonTypeInfo typeInfo, Type? parentType, JsonPropertyInfo? propertyInfo, ParameterInfo? parameterInfo) 717private static JsonObject CreateSchemaDocument( 724JsonObject? properties = null, 726JsonObject? arrayItems = null, 733var schema = new JsonObject(); 934[typeof(JsonObject)] = new(JsonSchemaType.Object),
Schemas\JsonSchemaMapper\JsonSchemaMapperConfiguration.cs (1)
74public Action<JsonSchemaGenerationContext, JsonObject>? OnSchemaGenerated { get; init; }
Services\Schemas\OpenApiSchemaService.cs (1)
99private JsonObject CreateSchema(OpenApiSchemaKey key)
Services\Schemas\OpenApiSchemaStore.cs (4)
17private readonly ConcurrentDictionary<OpenApiSchemaKey, JsonObject> _schemas = new() 35/// <returns>A <see cref="JsonObject" /> representing the JSON schema associated with the key.</returns> 36public JsonObject GetOrAdd(OpenApiSchemaKey key, Func<OpenApiSchemaKey, JsonObject> valueFactory)
MSBuild (7)
JsonOutputFormatter.cs (6)
61JsonObject jsonItem = new(); 91JsonObject itemsNode = new(); 97JsonObject jsonItem = new(); 132JsonObject targetResultsNode = new(); 136JsonObject targetResults = new(); 141JsonObject jsonItem = new();
XMake.cs (1)
4629var jsonNode = new JsonObject();
System.Text.Json (71)
System\Text\Json\Nodes\JsonArray.cs (2)
100case null or JsonObject: 394if (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"/>. 74public JsonObject AsObject() 76JsonObject? jObject = this as JsonObject; 80ThrowHelper.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"/>. 260JsonObject? parentObject = _parent as JsonObject; 264ThrowHelper.ThrowInvalidOperationException_NodeParentWrongType(nameof(JsonObject)); 318case 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> 60public static JsonObject? Create(JsonElement element, JsonNodeOptions? options = null) 93var jObject = new JsonObject(Options) 171case JsonObject jsonObject: 255private readonly JsonObject _node; 257public DebugView(JsonObject node) 308if (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)
19if (typeof(JsonObject) == typeToConvert)
System\Text\Json\Serialization\Converters\Node\JsonObjectConverter.cs (8)
10internal sealed class JsonObjectConverter : JsonConverter<JsonObject?> 27Debug.Assert(obj is JsonObject); 28JsonObject jObject = (JsonObject)obj; 36public override void Write(Utf8JsonWriter writer, JsonObject? value, JsonSerializerOptions options) 47public override JsonObject? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 61public static JsonObject ReadObject(ref Utf8JsonReader reader, JsonNodeOptions? options) 64JsonObject jObject = new JsonObject(jElement, options);
System\Text\Json\Serialization\JsonConverterOfT.cs (1)
461Debug.Assert(Type == typeof(Nodes.JsonObject));
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (2)
449if (jsonNode is JsonObject jsonObject) 502JsonObject => 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. 153public static JsonConverter<JsonObject?> JsonObjectConverter => s_jsonObjectConverter ??= new JsonObjectConverter(); 154private static JsonConverter<JsonObject?>? s_jsonObjectConverter;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
884Debug.Assert(propValue is Nodes.JsonObject);
WasmAppBuilder (8)
JsonExtensions.cs (1)
11public static T GetOrCreate<T>(this JsonObject json, string name, Func<JsonNode> creator) where T : JsonNode
wasi\WasiAppBuilder.cs (1)
134protected override void AddToRuntimeConfig(JsonObject wasmHostProperties, JsonArray runtimeArgsArray, JsonArray perHostConfigs)
WasmAppBuilderBaseTask.cs (6)
114JsonObject? rootObject = rootNode.AsObject(); 116|| !(runtimeOptionsNode is JsonObject runtimeOptionsObject)) 121JsonObject wasmHostProperties = runtimeOptionsObject.GetOrCreate<JsonObject>("wasmHostProperties", () => new JsonObject()); 141var hostConfigObject = new JsonObject(); 166protected virtual void AddToRuntimeConfig(JsonObject wasmHostProperties, JsonArray runtimeArgsArray, JsonArray perHostConfigs)