I think it is just: store bytes and let the reader decide how to deal with them. Starts with "http", it's a URL. Starts with "BEGIN:VCARD", it's a vcard. Primitive but it works well enough I guess.
Just by the structure of the contents. Clients are supposed to parse the string contents, realize it's a URL, and open the browser for example.