jsoninfo: wrap the outbuffer in a struct for easier usage