fixes #240: treat unrecognised extensions as JS; support JSON
Merge pull request #241 from michaelficarra/GH-240

fixes #240: treat unrecognised extensions as JS; support JSON