Enforce the nesting bound in one parse, capping allocation by depth, not input size.
Inline nlohmann/json for the JSON parsing itself, and handle requests with the same SCGI interface as XML-RPC. Based off the work in https://github.com/jesec/rtorrent