src/packages/EmbedIO/ResponseSerializer.cs
/// <summary>
/// Serializes data in JSON format with the specified <paramref name="jsonSerializerCase"/>
/// to a HTTP response, using the <see cref="Swan.Formatters.Json"/> utility class.
/// </summary>
/// <param name="jsonSerializerCase">The JSON serializer case.</param>
/// <returns>A <see cref="ResponseSerializerCallback"/> that can be used to serialize
/// data to a HTTP response.</returns>
Serializes data in JSON format with the specified
to a HTTP response, using the  utility class.
Serializes data in JSON format with the specified to a HTTP response using the utility class .
public static ResponseSerializerCallback Json(JsonSerializerCase jsonSerializerCase)
            => async (context, data) => {
                Validate.NotNull(nameof(context), context).Response.ContentType = MimeType.Json;
                using var text = context.OpenResponseText(new UTF8Encoding(false));
                await text.WriteAsync(Swan.Formatters.Json.Serialize(data, jsonSerializerCase)).ConfigureAwait(false);
            };
public static ResponseSerializerCallback Json ( JsonSerializerCase jsonSerializerCase ) => async ( context , data ) => { Validate . NotNull ( nameof ( context ) , context ) . Response . ContentType = MimeType . Json ; using var text = context . OpenResponseText ( new UTF8Encoding ( false ) ) ; await text . WriteAsync ( Swan . Formatters . Json . Serialize ( data , jsonSerializerCase ) ) . ConfigureAwait ( false ) ; } ;
Serializes data in JSON format with the specified
to a HTTP response, using the  utility class.
Serializes data in JSON format with the specified to a HTTP response using the utility class .
A  that can be used to serialize
data to a HTTP response.
A that can be used to serialize data to a HTTP response .
jsonSerializerCase
JsonSerializerCase
The JSON serializer case.
The JSON serializer case .