msgspec
msgspec copied to clipboard
custom class name for `array_like=True`
Description
Currently array_like encodes like [MyClassName,field0,field1,...]
For small structs (with descriptive names) this can be a large part of the message. Irrespectively encoding a string as a message identifier for fixed schemas is inefficient.
An option like u8 for schemas where possible union members <256 would be 👌
If you want to be extreme about it, optionally dropping the [] would save even more space