lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Josh !

Just out of curiosity, why didn't you just use Msgpack ? It's very compact, fast to parse, supported by many platforms/languages... [1], and creating Lua bindings takes just a couple of lines of C [2].


Gaspard

[1] http://msgpack.org/
[2] https://github.com/lubyk/lubyk/blob/master/modules/msgpack/vendor/lubyk.c#L193

On Sun, Jun 5, 2011 at 2:19 PM, Josh Simmons <simmons.44@gmail.com> wrote:
tnetstrings.lua
A library implementing tagged netstrings in Lua.

About Tagged Netstrings
====================

TNetStrings stand for a "tagged netstrings" and are a modification of
Dan Bernstein's netstrings specification to allow for the same data
structures as JSON but in a format that meets these requirements:

* Trivial to parse in every language without making errors.
* Resistant to buffer overflows and other problems.
* Fast and low resource intensive.
* Makes no assumptions about string contents and can store binary data
without escaping or encoding them.
* Backward compatible with original netstrings.
* Transport agnostic, so it works with streams, messages, files,
anything that's 8-bit clean.

http://tnetstrings.org/


My implementation is available on github
https://github.com/jsimmons/tnetstrings.lua and