Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
docs: added .json modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
koichik committed Oct 13, 2011
1 parent f243ca1 commit 1b55010
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions doc/api/modules.markdown
Expand Up @@ -98,10 +98,11 @@ return the built in HTTP module, even if there is a file by that name.
### File Modules

If the exact filename is not found, then node will attempt to load the
required filename with the added extension of `.js`, and then `.node`.
required filename with the added extension of `.js`, `.json`, and then `.node`.

`.js` files are interpreted as JavaScript text files, and `.node` files
are interpreted as compiled addon modules loaded with `dlopen`.
`.js` files are interpreted as JavaScript text files, and `.json` files are
parsed as JSON text files. `.node` files are interpreted as compiled addon
modules loaded with `dlopen`.

A module prefixed with `'/'` is an absolute path to the file. For
example, `require('/home/marco/foo.js')` will load the file at
Expand Down

0 comments on commit 1b55010

Please sign in to comment.