66 references to JsonMetadataServices
Microsoft.AspNetCore.Components.Web (1)
src\Components\Shared\src\JsonSerialization\JsonConverterFactoryTypeInfoResolver.cs (1)
40return JsonMetadataServices.CreateValueInfo<T>(options, converterToUse);
System.Text.Json (65)
System\Text\Json\Nodes\JsonValue.CreateOverloads.cs (33)
17public static JsonValue Create(bool value, JsonNodeOptions? options = null) => new JsonValuePrimitive<bool>(value, JsonMetadataServices.BooleanConverter, options); 25public static JsonValue? Create(bool? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<bool>(value.Value, JsonMetadataServices.BooleanConverter, options) : null; 33public static JsonValue Create(byte value, JsonNodeOptions? options = null) => new JsonValuePrimitive<byte>(value, JsonMetadataServices.ByteConverter, options); 41public static JsonValue? Create(byte? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<byte>(value.Value, JsonMetadataServices.ByteConverter, options) : null; 49public static JsonValue Create(char value, JsonNodeOptions? options = null) => new JsonValuePrimitive<char>(value, JsonMetadataServices.CharConverter, options); 57public static JsonValue? Create(char? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<char>(value.Value, JsonMetadataServices.CharConverter, options) : null; 65public static JsonValue Create(DateTime value, JsonNodeOptions? options = null) => new JsonValuePrimitive<DateTime>(value, JsonMetadataServices.DateTimeConverter, options); 73public static JsonValue? Create(DateTime? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<DateTime>(value.Value, JsonMetadataServices.DateTimeConverter, options) : null; 81public static JsonValue Create(DateTimeOffset value, JsonNodeOptions? options = null) => new JsonValuePrimitive<DateTimeOffset>(value, JsonMetadataServices.DateTimeOffsetConverter, options); 89public static JsonValue? Create(DateTimeOffset? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<DateTimeOffset>(value.Value, JsonMetadataServices.DateTimeOffsetConverter, options) : null; 97public static JsonValue Create(decimal value, JsonNodeOptions? options = null) => new JsonValuePrimitive<decimal>(value, JsonMetadataServices.DecimalConverter, options); 105public static JsonValue? Create(decimal? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<decimal>(value.Value, JsonMetadataServices.DecimalConverter, options) : null; 113public static JsonValue Create(double value, JsonNodeOptions? options = null) => new JsonValuePrimitive<double>(value, JsonMetadataServices.DoubleConverter, options); 121public static JsonValue? Create(double? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<double>(value.Value, JsonMetadataServices.DoubleConverter, options) : null; 129public static JsonValue Create(Guid value, JsonNodeOptions? options = null) => new JsonValuePrimitive<Guid>(value, JsonMetadataServices.GuidConverter, options); 137public static JsonValue? Create(Guid? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<Guid>(value.Value, JsonMetadataServices.GuidConverter, options) : null; 145public static JsonValue Create(short value, JsonNodeOptions? options = null) => new JsonValuePrimitive<short>(value, JsonMetadataServices.Int16Converter, options); 153public static JsonValue? Create(short? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<short>(value.Value, JsonMetadataServices.Int16Converter, options) : null; 161public static JsonValue Create(int value, JsonNodeOptions? options = null) => new JsonValuePrimitive<int>(value, JsonMetadataServices.Int32Converter, options); 169public static JsonValue? Create(int? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<int>(value.Value, JsonMetadataServices.Int32Converter, options) : null; 177public static JsonValue Create(long value, JsonNodeOptions? options = null) => new JsonValuePrimitive<long>(value, JsonMetadataServices.Int64Converter, options); 185public static JsonValue? Create(long? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<long>(value.Value, JsonMetadataServices.Int64Converter, options) : null; 194public static JsonValue Create(sbyte value, JsonNodeOptions? options = null) => new JsonValuePrimitive<sbyte>(value, JsonMetadataServices.SByteConverter, options); 203public static JsonValue? Create(sbyte? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<sbyte>(value.Value, JsonMetadataServices.SByteConverter, options) : null; 211public static JsonValue Create(float value, JsonNodeOptions? options = null) => new JsonValuePrimitive<float>(value, JsonMetadataServices.SingleConverter, options); 219public static JsonValue? Create(float? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<float>(value.Value, JsonMetadataServices.SingleConverter, options) : null; 228public static JsonValue? Create(string? value, JsonNodeOptions? options = null) => value != null ? new JsonValuePrimitive<string>(value, JsonMetadataServices.StringConverter!, options) : null; 237public static JsonValue Create(ushort value, JsonNodeOptions? options = null) => new JsonValuePrimitive<ushort>(value, JsonMetadataServices.UInt16Converter, options); 246public static JsonValue? Create(ushort? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<ushort>(value.Value, JsonMetadataServices.UInt16Converter, options) : null; 255public static JsonValue Create(uint value, JsonNodeOptions? options = null) => new JsonValuePrimitive<uint>(value, JsonMetadataServices.UInt32Converter, options); 264public static JsonValue? Create(uint? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<uint>(value.Value, JsonMetadataServices.UInt32Converter, options) : null; 273public static JsonValue Create(ulong value, JsonNodeOptions? options = null) => new JsonValuePrimitive<ulong>(value, JsonMetadataServices.UInt64Converter, options); 282public static JsonValue? Create(ulong? value, JsonNodeOptions? options = null) => value.HasValue ? new JsonValuePrimitive<ulong>(value.Value, JsonMetadataServices.UInt64Converter, options) : null;
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (31)
48Add(JsonMetadataServices.BooleanConverter); 49Add(JsonMetadataServices.ByteConverter); 50Add(JsonMetadataServices.ByteArrayConverter); 51Add(JsonMetadataServices.CharConverter); 52Add(JsonMetadataServices.DateTimeConverter); 53Add(JsonMetadataServices.DateTimeOffsetConverter); 55Add(JsonMetadataServices.DateOnlyConverter); 56Add(JsonMetadataServices.TimeOnlyConverter); 57Add(JsonMetadataServices.HalfConverter); 59Add(JsonMetadataServices.DoubleConverter); 60Add(JsonMetadataServices.DecimalConverter); 61Add(JsonMetadataServices.GuidConverter); 62Add(JsonMetadataServices.Int16Converter); 63Add(JsonMetadataServices.Int32Converter); 64Add(JsonMetadataServices.Int64Converter); 65Add(JsonMetadataServices.JsonElementConverter); 66Add(JsonMetadataServices.JsonDocumentConverter); 67Add(JsonMetadataServices.MemoryByteConverter); 68Add(JsonMetadataServices.ReadOnlyMemoryByteConverter); 69Add(JsonMetadataServices.ObjectConverter); 70Add(JsonMetadataServices.SByteConverter); 71Add(JsonMetadataServices.SingleConverter); 72Add(JsonMetadataServices.StringConverter); 73Add(JsonMetadataServices.TimeSpanConverter); 74Add(JsonMetadataServices.UInt16Converter); 75Add(JsonMetadataServices.UInt32Converter); 76Add(JsonMetadataServices.UInt64Converter); 78Add(JsonMetadataServices.Int128Converter); 79Add(JsonMetadataServices.UInt128Converter); 81Add(JsonMetadataServices.UriConverter); 82Add(JsonMetadataServices.VersionConverter);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
260JsonMetadataServices.PopulateProperties(this, list, propInit);