DBMS client applications need to store SQL query results in local
memory or local files. The format is flat and the fields are
ordered -- that's "serialization". The most important serializer
format uses human-readable markup, like
[start of field] [value] [end of field]
and the important ones in the MySQL/MariaDB world are CSV (what you get with SELECT ... INTO OUTFILE or
LOAD INFILE), XML (what you get with --xml or LOAD XML), and JSON (for which there are various solutions if you don't use MySQL 5.7).
The less important serializer format uses length, like
[length of value] [value]
and this, although it has the silly name "binary …