> I have a small, 500 LOC, json parser in C we can use, so that is > not going to drag in a dependency. > > If we're going to bite the JSON bullet, the other places it makes > sense to use it, is for the vcc_if.c::Vmod_Spec data structure > which explains the contents of a VMOD to VCC. > > Given that we are going to expand what VMODs can contain, that > "minilanguage" needs expansion too, so all in all, I think we > are over the threshold were JSON makes sense. > > ... but I still feel dirty using JSON to pass data structures > from one C-program to another, or as it may be, from a python > program to another.
There are other solutions for this kind of descriptors, and you could probably get a msgpack [1] subset implementation with the same-ish amount of code and get the benefits of actual typing (int, string, etc) and easier parsing. Dridi [1] http://msgpack.org/ _______________________________________________ varnish-dev mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
