A simple protocol packet class representing a received-items message. It defines the command string "ReceivedItems" and carries an array of NetworkItem plus an integer index, with JSON property names set for serialization.
using System.Text.Json.Serialization;
namespace APLib.Protocol.Packets;
public sealed class ReceivedItemsPacket : APPacket
{
public override string Command => "ReceivedItems";
[JsonPropertyName( "items" )]
public NetworkItem[] Items { get; set; }
[JsonPropertyName( "index" )]
public int Index { get; set; }
}