Write table JSON directly to the file