As of node v0.5.x yes you can require your JSON just as you would require a js file.
var someObject = require('./somefile.json')
In ES6:
import someObject from ('./somefile.json')
More Related Contents:
- Create JSON from a String
- How do I consume the JSON POST data in an Express application
- Proper way to return JSON using node or Express
- How to update a value in a json file and save it through node.js
- How can I pretty-print JSON using node.js?
- Convert Mongoose docs to json
- How do I add environment variables to launch.json in VSCode
- Is there a way to automatically build the package.json file for Node.js projects
- pass JSON to HTTP POST Request
- Node.js -Firebase Service Account Private Key won’t parse
- node.js readfile error with utf8 encoded file on windows
- What is “406-Not Acceptable Response” in HTTP?
- What is the difference between YAML and JSON?
- Spring MVC Multipart Request with JSON
- ASP.net MVC returning JSONP
- Convert Pandas DataFrame to JSON format
- Custom HttpMessageConverter with @ResponseBody to do Json things
- What is deserialize and serialize in JSON?
- JSON on IE6 (IE7)
- Create nested JSON arrays using FOR JSON PATH
- Curl GET request with json parameter
- How does require work with new operator in node.js?
- How can I deserialize an invalid json ? Truncated list of objects
- How to parse JSON in golang without unmarshaling twice
- HTTP POST with Json on Body – Flutter/Dart
- Decode JSON as it is still streaming in via net/http
- Is null valid JSON (4 bytes, nothing else)
- Use swift Codable to decode JSON with values as keys
- How to parse JSON from the Invoke-WebRequest in PowerShell?
- Any when decoding JSON with Codable?