[dev] Best way to serialize data

From: Džen <yvldwt_AT_gmail.com>
Date: Mon, 06 Jun 2011 19:19:56 +0200

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
Received on Mon Jun 06 2011 - 19:19:56 CEST

This archive was generated by hypermail 2.2.0 : Mon Jun 06 2011 - 19:24:04 CEST