I was wondering about which way would be the easiest/simplest to serialize data, f.e. being read via a file or stdin (data being a table of x rows and y columns, each cell a string). I thought of using NULL bytes as cell delimiters and newline characters as row delimiters. This way it wouldn't be possible to use \0 nor \n inside the "cells", but I couldn't think of a simpler solution.
Something like: a \0 b \0 c \n d \0 e \0 f \n ... What would you recommend? How'd you do it? Reason why I'm asking is because I was wondering how a dmenu-alike utility would read data, where each items has multiple values, not just one. Kinda like a search utility for table-structured data. -- Džen