10 internal const string CreateUnreferencedCodeMessage =
"Creating JsonValue instances with non-primitive types is not compatible with trimming. It can result in non-primitive types being serialized, which may have their members trimmed.";
283 [
RequiresUnreferencedCode(
"Creating JsonValue instances with non-primitive types is not compatible with trimming. It can result in non-primitive types being serialized, which may have their members trimmed. Use the overload that takes a JsonTypeInfo, or make sure all of the required types are preserved.")]
329 if (
base.Parent !=
null)
345[DebuggerDisplay(
"{ToJsonString(),nq}")]
350 [DebuggerDisplay(
"{Json,nq}")]
356 public string Json =>
_node.ToJsonString();
422 return (TypeToConvert)(object)
jsonElement.GetInt32();
426 return (TypeToConvert)(object)
jsonElement.GetInt64();
430 return (TypeToConvert)(object)
jsonElement.GetDouble();
434 return (TypeToConvert)(object)
jsonElement.GetInt16();
438 return (TypeToConvert)(object)
jsonElement.GetDecimal();
442 return (TypeToConvert)(object)
jsonElement.GetByte();
446 return (TypeToConvert)(object)
jsonElement.GetSingle();
450 return (TypeToConvert)(object)
jsonElement.GetUInt32();
454 return (TypeToConvert)(object)
jsonElement.GetUInt16();
458 return (TypeToConvert)(object)
jsonElement.GetUInt64();
462 return (TypeToConvert)(object)
jsonElement.GetSByte();
468 return (TypeToConvert)(object)
jsonElement.GetString();
472 return (TypeToConvert)(object)
jsonElement.GetDateTime();
476 return (TypeToConvert)(object)
jsonElement.GetDateTimeOffset();
480 return (TypeToConvert)(object)
jsonElement.GetGuid();
485 if (@
string.Length == 1)
487 return (TypeToConvert)(object)@
string[0];
495 return (TypeToConvert)(object)
jsonElement.GetBoolean();
512 result = (TypeToConvert)(
object)
value;
519 result = (TypeToConvert)(
object)
value2;
526 result = (TypeToConvert)(
object)
value3;
533 result = (TypeToConvert)(
object)
value4;
540 result = (TypeToConvert)(
object)
value5;
547 result = (TypeToConvert)(
object)
value6;
554 result = (TypeToConvert)(
object)
value7;
561 result = (TypeToConvert)(
object)
value8;
568 result = (TypeToConvert)(
object)
value9;
575 result = (TypeToConvert)(
object)
value10;
582 result = (TypeToConvert)(
object)
value11;
590 result = (TypeToConvert)(
object)@
string;
597 result = (TypeToConvert)(
object)
value12;
604 result = (TypeToConvert)(
object)
value13;
611 result = (TypeToConvert)(
object)
value14;
619 result = (TypeToConvert)(
object)
string2[0];
628 result = (TypeToConvert)(
object)
jsonElement.GetBoolean();
633 result =
default(TypeToConvert);
static string NodeUnableToConvertElement
static string Format(string resourceFormat, object p1)
static string NodeUnableToConvert
static string NodeElementCannotBeObjectOrArray
DebugView(JsonValue< TValue > node)
JsonValue< TValue > _node
static ? JsonValue Create(int? value, JsonNodeOptions? options=null)
static JsonValue Create(ushort value, JsonNodeOptions? options=null)
JsonValue(JsonNodeOptions? options=null)
static ? JsonValue Create(DateTime? value, JsonNodeOptions? options=null)
static ? JsonValue Create(sbyte? value, JsonNodeOptions? options=null)
static JsonValue Create(double value, JsonNodeOptions? options=null)
static JsonValue Create(int value, JsonNodeOptions? options=null)
static ? JsonValue Create(string? value, JsonNodeOptions? options=null)
static ? JsonValue Create(byte? value, JsonNodeOptions? options=null)
override void GetPath(List< string > path, JsonNode child)
static JsonValue Create(sbyte value, JsonNodeOptions? options=null)
static JsonValue Create(uint value, JsonNodeOptions? options=null)
static ? JsonValue Create(ulong? value, JsonNodeOptions? options=null)
static JsonValue Create(DateTimeOffset value, JsonNodeOptions? options=null)
static JsonValue Create(bool value, JsonNodeOptions? options=null)
TypeToConvert ConvertJsonElement< TypeToConvert >()
static JsonValue Create(char value, JsonNodeOptions? options=null)
static ? JsonValue Create(long? value, JsonNodeOptions? options=null)
static ? JsonValue Create(JsonElement? value, JsonNodeOptions? options=null)
static JsonValue Create(byte value, JsonNodeOptions? options=null)
static ? JsonValue Create(decimal? value, JsonNodeOptions? options=null)
const string CreateUnreferencedCodeMessage
static ? JsonValue Create(char? value, JsonNodeOptions? options=null)
static JsonValue Create(float value, JsonNodeOptions? options=null)
static JsonValue Create(decimal value, JsonNodeOptions? options=null)
static JsonValue Create(DateTime value, JsonNodeOptions? options=null)
static JsonValue Create(Guid value, JsonNodeOptions? options=null)
static ? JsonValue Create(float? value, JsonNodeOptions? options=null)
static ? JsonValue Create(JsonElement value, JsonNodeOptions? options=null)
bool TryConvertJsonElement< TypeToConvert >([NotNullWhen(true)] out TypeToConvert result)
static ? JsonValue Create(short? value, JsonNodeOptions? options=null)
JsonValue(TValue value, JsonNodeOptions? options=null)
static ? JsonValue Create< T >(T? value, JsonNodeOptions? options=null)
static JsonValue Create(long value, JsonNodeOptions? options=null)
static ? JsonValue Create(uint? value, JsonNodeOptions? options=null)
bool TryGetValue< T >([NotNullWhen(true)] out T? value)
static ? JsonValue Create(Guid? value, JsonNodeOptions? options=null)
override T GetValue< T >()
static void VerifyJsonElementIsNotArrayOrObject(ref JsonElement element)
static JsonValue Create(ulong value, JsonNodeOptions? options=null)
static ? JsonValue Create(DateTimeOffset? value, JsonNodeOptions? options=null)
static ? JsonValue Create(bool? value, JsonNodeOptions? options=null)
static JsonValue Create(short value, JsonNodeOptions? options=null)
static ? JsonValue Create(double? value, JsonNodeOptions? options=null)
static ? JsonValue Create(ushort? value, JsonNodeOptions? options=null)
static JsonConverter< byte > ByteConverter
static JsonConverter< DateTimeOffset > DateTimeOffsetConverter
static JsonConverter< long > Int64Converter
static JsonConverter< uint > UInt32Converter
static JsonConverter< DateTime > DateTimeConverter
static JsonConverter< ulong > UInt64Converter
static JsonConverter< double > DoubleConverter
static JsonConverter< ushort > UInt16Converter
static JsonConverter< Guid > GuidConverter
static JsonConverter< char > CharConverter
static JsonConverter< int > Int32Converter
static JsonConverter< short > Int16Converter
static JsonConverter< bool > BooleanConverter
static JsonConverter< sbyte > SByteConverter
static JsonConverter< JsonElement > JsonElementConverter
static JsonConverter< float > SingleConverter
static JsonConverter< string > StringConverter
static JsonConverter< decimal > DecimalConverter
static void ThrowArgumentException_NodeValueNotAllowed(string paramName)