[Xapian-discuss] Re: Xapian-discuss Digest, Vol 35, Issue 9
James Aylett
james-xapian at tartarus.org
Tue Apr 10 13:23:12 BST 2007
On Mon, Apr 09, 2007 at 02:37:31PM -0700, Mark Blythe wrote:
> I wouldn't go so far as to write a full parser either, but there are plenty
> of pre-existing packages for serializing/deserializing data structures. You
> shouldn't have to re-invent the wheel. If you want to go with a delimited
> string and can't think of any printable character that you can guarantee
> won't be in the data, you can always choose a non-printable delimiter, like
> a chr(0) or chr(7). If you want to store key/value pairs but don't trust
> eval Data::Dumper, use JSON. It's eval-safe and language-independent.
I'd generally recommend JSON in most cases, particularly for getting
started. It has great support across a very wide range of languages,
and can transport more conveniently than XML (particularly, NULs).
(Note: I'd never recommend eval() unless there's no alternative. With
JSON, there is :-)
J
--
/--------------------------------------------------------------------------\
James Aylett xapian.org
james at tartarus.org uncertaintydivision.org
More information about the Xapian-discuss
mailing list