Large json files changes.

Use json filetype instead of javascript, and protect when opening large
files.