};
+// Native extension for .json
+Module._extensions['.json'] = function (module, filename) {
+ var content = NativeModule.require('fs').readFileSync(filename, 'utf8');
+ module.exports = JSON.parse(content);
+};
+
+
// bootstrap main module.
Module.runMain = function() {
// Load the main module--the command line argument.
assert.equal(child.loaded, parent.loaded);
+// #1357 Loading JSON files with require()
+var json = require('../fixtures/packages/main/package.json');
+assert.deepEqual(json, { name: 'package-name',
+ version: '1.2.3',
+ main: 'package-main-module' });
+
+
process.addListener('exit', function() {
assert.ok(common.indirectInstanceOf(a.A, Function));
assert.equal('A done', a.A());