Hacker News new | ask | show | jobs
by areop 4235 days ago
I wrote a JSON-Parser in C with minimal validation in ~250 LOC that does not allocate memory, but leaves the type check and conversion to the user. https://github.com/vurtun/json
4 comments

It would be nice if the README mentioned it was originally based on my https://github.com/quartzjer/js0n :)
Added your project as a reference. Sorry for the missing reference I originally never planned to make the project known publicly and therefore never added the references.
This is absolutely beautiful. I didn't know you could get an address of a label in C or to do a goto to an address from variable instead of a literal label. Is this new in C, or was it always there?
Is there an equivalent for Clang/LLVM?
Yes.

http://blog.llvm.org/2010/01/address-of-label-and-indirect-b...

A venerable interpreter implementation trick.

Unfortunately it won't port to IAR, which is a shame. I don't understand why pointers to labels never made it to the C spec; it's one of the (equivaling) features that actually makes assembler look elegant.
That test.c file looks familiar!
Yeah I was looking for unit test macros and found your project. I added your project as a reference in the README for clarification of the origin.
That's a very nice code.