Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the JSON object global in Node.js?

Tags:

I can't seem to find the documentation on JSON.parse(...) for Node.js. I just see it littered around various scripts. I was wondering, where does it come from - are there certain callbacks that make it available or is it a global object?

Thanks! Matt Mueller

like image 980
Matt Avatar asked Jan 31 '11 22:01

Matt


People also ask

What is the global object in Nodejs?

Node. js Global Objects are the objects that are available in all modules. Global Objects are built-in objects that are part of the JavaScript and can be used directly in the application without importing any particular module.

Does node have a global object?

Node. js global objects are global in nature and they are available in all modules. We do not need to include these objects in our application, rather we can use them directly. These objects are modules, functions, strings and object itself as explained below.

Which of the following is not global in node JS?

The top-level scope is not the global scope; var something inside a Node. JS module will be local to that module.

What is JSON object in node JS?

JavaScript Object Notation, or JSON, is a lightweight data format that has become the defacto standard for the web. JSON can be represented as either a list of values, e.g. an Array, or a hash of properties and values, e.g. an Object.


1 Answers

It's built into V8.

Here's a link to their implementation: http://code.google.com/p/v8/source/browse/trunk/src/json.js

like image 190
generalhenry Avatar answered Oct 13 '22 00:10

generalhenry