An alternative approach might be to use an existing popular serialization format such as Protocol Buffers, Apache Thrift, or Cap'N'Proto and create or improve tools that convert to/from human-readable text formats to the serialized binary format.
For example:
- Protocol buffers have a text format mode: https://medium.com/@nathantnorth/protocol-buffers-text-forma...
- Thrift has readable-thrift which is a human-friendly encoder and decoder: https://github.com/nccgroup/readable-thrift
- Cap'N'Proto has a `capnp` tool for encoding/decoding text representations to binary which seems to be officially supported and documented! https://capnproto.org/capnp-tool.html
These libraries have been battle-tested by major companies in production, some protocols and implementations have gone through security audits, and in addition each of these formats already has many language bindings, for example:
- Protocol Buffer Third-party language bindings: https://github.com/protocolbuffers/protobuf/blob/master/docs...
- Apache Thrift language support: https://github.com/apache/thrift/blob/master/LANGUAGES.md
- Cap'N'Proto in other languages: https://capnproto.org/otherlang.html