According to the book Designing Data Intensive Applications
, it says
whenever you want to send data over the network or write it to a file—you need to encode it as a sequence of bytes.
It then goes on to introduce JSON, XML as human readable format. It then says if you want more compact formats, you can try some binary encoding formats such as BSON, or PROTOBUF or THRIFT.
How does JSON (not BSON) encode data as a sequence of bytes if it's a human readable text?