JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 85
  • Score
    100M100P100Q96227F

Load a JSON file

Package Exports

  • json-parse

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (json-parse) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

About

Simple module that parses a given JSON file. At the moment it only supports async, but I plan on expanding it to not only support sync, but HTTP requests that return JSON :)

Install

You can install this through npm:

$ npm install json-parse

Basic Use

Async:

var json = require("json-parse");
json.async("./test.json", function (error, data)
{
  if (!error)
  {
    console.log(data.something_from_test_dot_json);
  }
  else
  {
    console.log("test.json doesnt exist!");
  }
});

License

Copyright 2011, do whatever you want, just dont sue me. If you want a more elaborate answer, look at the FreeBSD / MIT styled licenses.