JSON for storing metadata

On the same line as dependency managers, JSON is also used to store metadata for software projects. Prior to JSON becoming popular, the configurations and metadata were either stored in a text file or in language-specific files, such as config.php for PHP, config.py for Python, and config.js for JavaScript. All these can now be replaced by a language-independent config.json file; use a JSON library for non-JavaScript libraries to parse it. Let's take a quick look at an example config.json file:

JSON for storing metadata

config.json

In the config.json file, we store the metadata as a JSON object. We are specifying important information such as the ...

Get JavaScript and JSON Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.