Table of Contents

Class JsonArraySerializer

Namespace
Xunit.Sdk
Assembly
xunit.v3.common.dll

A special-purpose streaming serializer for arrays to JSON. Only supports a limited number of types (boolean, DateTimeOffset, decimal, Enum, int, long, string, and trait dictionaries).

public sealed class JsonArraySerializer : JsonSerializerBase, IDisposable
Inheritance
JsonArraySerializer
Implements
Inherited Members

Remarks

These types are made public for third parties only for the purpose of serializing and deserializing messages that are sent across the process boundary (that is, types which implement IMessageSinkMessage). Any other usage is not supported.

Constructors

JsonArraySerializer(StringBuilder, Action?)

A special-purpose streaming serializer for arrays to JSON. Only supports a limited number of types (boolean, DateTimeOffset, decimal, Enum, int, long, string, and trait dictionaries).

Methods

Serialize(IReadOnlyDictionary<string, IReadOnlyCollection<string>>)

Serialize a trait dictionary value into the array.

Serialize(Enum?)

Serialize an Enum value into the array.

Serialize(bool?)

Serialize a bool value into the array.

Serialize(DateTimeOffset?)

Serialize a DateTimeOffset value into the array.

Serialize(decimal?)

Serialize a decimal value into the array.

Serialize(int?)

Serialize an int value into the array.

Serialize(long?)

Serialize a long value into the array.

Serialize(string?)

Serialize a string value into the array.

SerializeArray()

Start serializing an array into the array.

SerializeObject()

Start serializing an object into the array.