json: add file dump function, and more C++ wrappers