Re:Show HN: Very low footprint JSON parser in portable ANSI C
by haberman on Sunday February 12, 2012 @05:35PM
(#3583257)
What's wrong with YAJL?
Re:Show HN: Very low footprint JSON parser in portable ANSI C
by lflux on Monday February 13, 2012 @04:13AM
(#3584842)
Nothing, YAJL got a lot of things very right. We use it in our C daemons for a bunch of things. Not having to unpack the whole JSON into memory is pretty handy.
Re:Show HN: Very low footprint JSON parser in portable ANSI C
by mikehuffman on Sunday February 12, 2012 @10:48PM
(#3584120)
Nothing is wrong with yajl it is awesome! I have used the lua module for yajl for some time with no hiccups.
http://git.qemu.org/?p=qemu.git;a=blob;f=json-lexer.c;h=3cd3...
http://git.qemu.org/?p=qemu.git;a=blob;f=json-parser.c;h=849...
Among other things, this supports streaming, is fairly fast, and has gotten a fair bit of scrutiny against malicious input.
The lexer is a hand written state machine which seems like something you should never do but turned out to be pretty reasonable.