Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ namespace System.Text.Json.Serialization
/// </summary>
public sealed class BinaryDataJsonConverter : JsonConverter<BinaryData>
{
/// <summary>
/// Initializes a new instance of the <see cref="BinaryDataJsonConverter"/>.
/// </summary>
public BinaryDataJsonConverter()
{ }

/// <inheritdoc/>
public override BinaryData? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,10 @@ internal int GetElementIndex(JsonNode? node)
}

/// <summary>
/// Returns enumerator that wraps calls to <see cref="JsonNode.GetValue{T}"/>.
/// Returns an enumerable that wraps calls to <see cref="JsonNode.GetValue{T}"/>.
Comment thread
eiriktsarpalis marked this conversation as resolved.
/// </summary>
/// <typeparam name="T">The type of the value to obtain from the <see cref="JsonValue"/>.</typeparam>
/// <returns>An enumerable iterating over values of the array.</returns>
public IEnumerable<T> GetValues<T>()
{
foreach (JsonNode? item in List)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ public JsonNode? this[string propertyName]
/// <summary>
/// Creates a new instance of the <see cref="JsonNode"/>. All children nodes are recursively cloned.
/// </summary>
/// <returns>A new cloned instance of the current node.</returns>
public JsonNode DeepClone() => DeepCloneCore();

internal abstract JsonNode DeepCloneCore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public sealed class JsonObjectCreationHandlingAttribute : JsonAttribute
/// <summary>
/// Initializes a new instance of <see cref="JsonObjectCreationHandlingAttribute"/>.
/// </summary>
/// <param name="handling">The handling to apply to the current member.</param>
public JsonObjectCreationHandlingAttribute(JsonObjectCreationHandling handling)
{
if (!JsonSerializer.IsValidCreationHandlingValue(handling))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class JsonUnmappedMemberHandlingAttribute : JsonAttribute
/// <summary>
/// Initializes a new instance of <see cref="JsonUnmappedMemberHandlingAttribute"/>.
/// </summary>
/// <param name="unmappedMemberHandling">The handling to apply to the current member.</param>
public JsonUnmappedMemberHandlingAttribute(JsonUnmappedMemberHandling unmappedMemberHandling)
{
UnmappedMemberHandling = unmappedMemberHandling;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ internal sealed override void WriteAsPropertyNameAsObject(Utf8JsonWriter writer,
throw new InvalidOperationException();
}

/// <inheritdoc/>
public sealed override Type? Type => null;

internal sealed override void WriteAsPropertyNameCoreAsObject(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ internal bool TryWriteDataExtensionProperty(Utf8JsonWriter writer, T value, Json
return success;
}

/// <inheritdoc/>
public sealed override Type Type { get; } = typeof(T);

internal void VerifyRead(JsonTokenType tokenType, int depth, long bytesConsumed, bool isValueConverter, ref Utf8JsonReader reader)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ namespace System.Text.Json.Serialization
public sealed class JsonNumberEnumConverter<TEnum> : JsonConverterFactory
where TEnum : struct, Enum
{
/// <summary>
/// Initializes a new instance of <see cref="JsonNumberEnumConverter{TEnum}"/>.
/// </summary>
public JsonNumberEnumConverter() { }

/// <inheritdoc />
public override bool CanConvert(Type typeToConvert) => typeToConvert == typeof(TEnum);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public static partial class JsonSerializer
/// </summary>
/// <param name="document">The <see cref="JsonDocument"/> to convert.</param>
/// <param name="jsonTypeInfo">Metadata about the type to convert.</param>
/// <returns>A <paramref name="jsonTypeInfo"/> representation of the JSON value.</returns>
/// <exception cref="System.ArgumentNullException">
/// <paramref name="document"/> is <see langword="null"/>.
///
Expand Down