Defines a base packet type for the APP protocol used by the project. It declares a Json-serializable Command property named "cmd" that is virtual so derived packet types can override it; comment notes it cannot be abstract due to deserialization.
using System.Text.Json.Serialization;
namespace APLib.Protocol;
// Can't be abstract because of deserialization
public class APPacket
{
// Make sure to override this in your packet!!!
[JsonPropertyName( "cmd" )]
public virtual string Command { get; private set; }
}