VSC self-documentation

Devon H. O'Dell dho at fastly.com
Thu May 18 19:24:41 CEST 2017


On Thu, May 18, 2017 at 12:15 AM, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
> And then we run into the how do we encode that in the VSM segment
> thing, and after looking at all the alternatives I could imagine,
> I end up with JSON ... again, again, again.
>
> I have a small, 500 LOC, json parser in C we can use, so that is
> not going to drag in a dependency.

In case JSON ends up being a thing, I recently contributed to a JSON
project, https://github.com/skeeto/pdjson. It's a streaming parser,
and is the only C JSON parser that passes / fails all the tests as
expected in https://github.com/nst/JSONTestSuite
(http://seriot.ch/parsing_json.php). It's ~700 LOC with header files,
and supports custom allocators.

Unsure whether strict correctness is required, but it certainly can't
hurt (especially if folks end up building e.g. VMODs on top of it).

--dho



More information about the varnish-dev mailing list