File: System\Text\Json\Nodes\JsonNode.Operators.cs
Web Access
Project: src\src\libraries\System.Text.Json\src\System.Text.Json.csproj (System.Text.Json)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
 
using System.Diagnostics.CodeAnalysis;
 
namespace System.Text.Json.Nodes
{
    public partial class JsonNode
    {
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="bool"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="bool"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode(bool value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="bool"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="bool"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode?(bool? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="byte"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="byte"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode(byte value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="byte"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="byte"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode?(byte? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="char"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="char"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode(char value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="char"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="char"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode?(char? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="DateTime"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="DateTime"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode(DateTime value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="DateTime"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="DateTime"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode?(DateTime? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="DateTimeOffset"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="DateTimeOffset"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode(DateTimeOffset value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="DateTimeOffset"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="DateTimeOffset"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode?(DateTimeOffset? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="decimal"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="decimal"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode(decimal value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="decimal"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="decimal"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode?(decimal? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="double"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="double"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode(double value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="double"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="double"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode?(double? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="Guid"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="Guid"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode(Guid value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="Guid"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="Guid"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode?(Guid? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="short"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="short"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode(short value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="short"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="short"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode?(short? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="int"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="int"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode(int value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="int"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="int"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode?(int? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="long"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="long"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode(long value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="long"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="long"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode?(long? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="sbyte"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="sbyte"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        [System.CLSCompliantAttribute(false)]
        public static implicit operator JsonNode(sbyte value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="sbyte"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="sbyte"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        [System.CLSCompliantAttribute(false)]
        public static implicit operator JsonNode?(sbyte? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="float"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="float"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode(float value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="float"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="float"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        public static implicit operator JsonNode?(float? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="string"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="string"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        [return: NotNullIfNotNull(nameof(value))]
        public static implicit operator JsonNode?(string? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="ushort"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="ushort"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        [System.CLSCompliantAttribute(false)]
        public static implicit operator JsonNode(ushort value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="ushort"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="ushort"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        [System.CLSCompliantAttribute(false)]
        public static implicit operator JsonNode?(ushort? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="uint"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="uint"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        [System.CLSCompliantAttribute(false)]
        public static implicit operator JsonNode(uint value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="uint"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="uint"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        [System.CLSCompliantAttribute(false)]
        public static implicit operator JsonNode?(uint? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="ulong"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="ulong"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        [System.CLSCompliantAttribute(false)]
        public static implicit operator JsonNode(ulong value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an implicit conversion of a given <see cref="ulong"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="ulong"/> to implicitly convert.</param>
        /// <returns>A <see cref="JsonNode"/> instance converted from the <paramref name="value"/> parameter.</returns>
        [System.CLSCompliantAttribute(false)]
        public static implicit operator JsonNode?(ulong? value) => JsonValue.Create(value);
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="bool"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="bool"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator bool(JsonNode value) => value.GetValue<bool>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="bool"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="bool"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator bool?(JsonNode? value) => value?.GetValue<bool>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="byte"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="byte"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator byte(JsonNode value) => value.GetValue<byte>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="byte"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="byte"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator byte?(JsonNode? value) => value?.GetValue<byte>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="char"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="char"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator char(JsonNode value) => value.GetValue<char>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="char"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="char"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator char?(JsonNode? value) => value?.GetValue<char>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="DateTime"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="DateTime"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator DateTime(JsonNode value) => value.GetValue<DateTime>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="DateTime"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="DateTime"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator DateTime?(JsonNode? value) => value?.GetValue<DateTime>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="DateTimeOffset"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="DateTimeOffset"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator DateTimeOffset(JsonNode value) => value.GetValue<DateTimeOffset>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="DateTimeOffset"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="DateTimeOffset"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator DateTimeOffset?(JsonNode? value) => value?.GetValue<DateTimeOffset>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="decimal"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="decimal"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator decimal(JsonNode value) => value.GetValue<decimal>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="decimal"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="decimal"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator decimal?(JsonNode? value) => value?.GetValue<decimal>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="double"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="double"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator double(JsonNode value) => value.GetValue<double>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="double"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="double"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator double?(JsonNode? value) => value?.GetValue<double>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="Guid"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="Guid"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator Guid(JsonNode value) => value.GetValue<Guid>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="Guid"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="Guid"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator Guid?(JsonNode? value) => value?.GetValue<Guid>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="short"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="short"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator short(JsonNode value) => value.GetValue<short>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="short"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="short"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator short?(JsonNode? value) => value?.GetValue<short>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="int"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="int"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator int(JsonNode value) => value.GetValue<int>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="int"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="int"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator int?(JsonNode? value) => value?.GetValue<int>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="long"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="long"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator long(JsonNode value) => value.GetValue<long>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="long"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="long"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator long?(JsonNode? value) => value?.GetValue<long>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="sbyte"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="sbyte"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        [System.CLSCompliantAttribute(false)]
        public static explicit operator sbyte(JsonNode value) => value.GetValue<sbyte>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="sbyte"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="sbyte"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        [System.CLSCompliantAttribute(false)]
        public static explicit operator sbyte?(JsonNode? value) => value?.GetValue<sbyte>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="float"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="float"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator float(JsonNode value) => value.GetValue<float>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="float"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="float"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator float?(JsonNode? value) => value?.GetValue<float>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="string"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="string"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        public static explicit operator string?(JsonNode? value) => value?.GetValue<string>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="ushort"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="ushort"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        [System.CLSCompliantAttribute(false)]
        public static explicit operator ushort(JsonNode value) => value.GetValue<ushort>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="ushort"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="ushort"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        [System.CLSCompliantAttribute(false)]
        public static explicit operator ushort?(JsonNode? value) => value?.GetValue<ushort>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="uint"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="uint"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        [System.CLSCompliantAttribute(false)]
        public static explicit operator uint(JsonNode value) => value.GetValue<uint>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="uint"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="uint"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        [System.CLSCompliantAttribute(false)]
        public static explicit operator uint?(JsonNode? value) => value?.GetValue<uint>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="ulong"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="ulong"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        [System.CLSCompliantAttribute(false)]
        public static explicit operator ulong(JsonNode value) => value.GetValue<ulong>();
 
        /// <summary>
        ///   Defines an explicit conversion of a given <see cref="ulong"/> to a <see cref="JsonNode"/>.
        /// </summary>
        /// <param name="value">A <see cref="ulong"/> to explicitly convert.</param>
        /// <returns>A value converted from the <see cref="JsonNode"/> instance.</returns>
        [System.CLSCompliantAttribute(false)]
        public static explicit operator ulong?(JsonNode? value) => value?.GetValue<ulong>();
    }
}