Hacker News new | ask | show | jobs
by panzerboiler 1284 days ago
I usually prefer a binary encoding. More efficient on the wire, easier to parse and generate, and with no ambiguity. We have 2 control codes given to us by the teletype era that have the perfect meaning for this kind of data:

    0x1E Record Separator
    0x1F Unit Separator
1 comments

and because its a single byte, its fast, no need to tokenize.

You also have 2 more the group separator and the file separator. so you could represent a tree with it.