▲ | cryptonector 12 hours ago | ||||||||||||||||
I've wanted to do just this. I've used libmicrohttpd, and... it's not my favorite. But if you're going to do it in C then libmicrohttpd is probably the best API to use. You get bonus points for using jq :) If you're also using jq you might as well ditch Jansson and use jq's `jv` API. I highly recommend it. | |||||||||||||||||
▲ | williamcotton 11 hours ago | parent [-] | ||||||||||||||||
One thing that sold me on Jansson is that you can set custom allocators which work very well with the request arena. Once those allocators are set the json objects continue to use the arena even when used in middleware. This makes memory management a cinch! From what I can tell jq’s C lib doesn’t yet expose a way to set custom allocators. | |||||||||||||||||
|