JSON5 is an extension to the popular JSON file format that aims to be easier to write and maintain by hand (e.g. for config files). It is not intended to be used for machine-to-machine communication. JSON5 was started in 2012, and as of 2022, now gets >65M downloads/week, ranks in the top 0.1% of the most depended-upon packages on npm, and has been adopted by major projects like Chromium, Next.js, Babel, Retool, WebStorm, and more. It's also natively supported on Apple platforms like MacOS and iOS. Formally, the JSON5 Data Interchange Format is a superset of JSON (so valid JSON files will always be valid JSON5 files) that expands its syntax to include some productions from ECMAScript 5.1 (ES5). It's also a subset of ES5, so valid JSON5 files will always be valid ES5. This JavaScript library is a reference implementation for JSON5 parsing and serialization and is directly used in many of the popular projects mentioned above.

Features

  • Arrays may have a single trailing comma
  • Strings may be single quoted
  • Numbers may be hexadecimal
  • Single and multi-line comments are allowed
  • Additional white space characters are allowed
  • Strings may include character escapes

Project Samples

Project Activity

See All Activity >

Categories

JSON

License

MIT License

Follow JSON5

JSON5 Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of JSON5!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript JSON Software

Registered

2023-10-06