vcl: use VSB for json instead of rolling our own

Also: Fix memory leak with *tmp which was never freed.