Changed the file extension for the created json file from .json to .js
Modified the existing tests to prevent the test failure which depends on a wrong expected output.
Wrote test for the json library.