Supports giving just a file name to the build function that should be JSON.