/// </summary>
/// <returns>A UTF-8 representation of the value.</returns>
/// <param name="value">The value to convert.</param>
- /// <param name="options">Options to control the convertion behavior.</param>
+ /// <param name="options">Options to control the conversion behavior.</param>
public static byte[] ToBytes<TValue>(TValue value, JsonSerializerOptions options = null)
{
return WriteCoreBytes(value, typeof(TValue), options);
/// <returns>A UTF-8 representation of the value.</returns>
/// <param name="value">The value to convert.</param>
/// <param name="type">The type of the <paramref name="value"/> to convert.</param>
- /// <param name="options">Options to control the convertion behavior.</param>
+ /// <param name="options">Options to control the conversion behavior.</param>
public static byte[] ToBytes(object value, Type type, JsonSerializerOptions options = null)
{
VerifyValueAndType(value, type);
/// <returns>A task that represents the asynchronous write operation.</returns>
/// <param name="value">The value to convert.</param>
/// <param name="utf8Json">The UTF-8 <see cref="System.IO.Stream"/> to write to.</param>
- /// <param name="options">Options to control the convertion behavior.</param>
+ /// <param name="options">Options to control the conversion behavior.</param>
/// <param name="cancellationToken">The <see cref="System.Threading.CancellationToken"/> which may be used to cancel the write operation.</param>
public static Task WriteAsync<TValue>(TValue value, Stream utf8Json, JsonSerializerOptions options = null, CancellationToken cancellationToken = default)
{
/// <param name="value">The value to convert.</param>
/// <param name="type">The type of the <paramref name="value"/> to convert.</param>
/// <param name="utf8Json">The UTF-8 <see cref="System.IO.Stream"/> to write to.</param>
- /// <param name="options">Options to control the convertion behavior.</param>
+ /// <param name="options">Options to control the conversion behavior.</param>
/// <param name="cancellationToken">The <see cref="System.Threading.CancellationToken"/> which may be used to cancel the write operation.</param>
public static Task WriteAsync(object value, Type type, Stream utf8Json, JsonSerializerOptions options = null, CancellationToken cancellationToken = default)
{
/// </summary>
/// <returns>A <see cref="System.String"/> representation of the value.</returns>
/// <param name="value">The value to convert.</param>
- /// <param name="options">Options to control the convertion behavior.</param>
+ /// <param name="options">Options to control the conversion behavior.</param>
/// <remarks>Using a <see cref="System.String"/> is not as efficient as using UTF-8
/// encoding since the implementation internally uses UTF-8. See also <see cref="ToBytes"/>
/// and <see cref="WriteAsync"/>.
/// <returns>A <see cref="System.String"/> representation of the value.</returns>
/// <param name="value">The value to convert.</param>
/// <param name="type">The type of the <paramref name="value"/> to convert.</param>
- /// <param name="options">Options to control the convertion behavior.</param>
+ /// <param name="options">Options to control the conversion behavior.</param>
/// <remarks>Using a <see cref="System.String"/> is not as efficient as using UTF-8
/// encoding since the implementation internally uses UTF-8. See also <see cref="ToBytes"/>
/// and <see cref="WriteAsync"/>.