Download the PHP package colinodell/json5 without Composer

On this page you can find all versions of the php package colinodell/json5. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

All versions of json5 with dependencies

Informations about the package json5

JSON5 for PHP - JSON for Humans

Latest Version on Packagist PHP 7.1+ Build Status Coverage Status SensioLabs Insight UTF-8 Compatible Total Downloads

This library is a PHP fork of the JSON5 reference implementation.

JSON5 is a JS-compatible extension to JSON which allows comments, trailing commas, single-quoted strings, and more:

See the JSON5 website for additional examples and details.

Install

Via Composer

Usage

This package adds a json5_decode() function which is a drop-in replacement for PHP's built-in json_decode():

It takes the same exact parameters in the same order. For more details on these, see the PHP docs.

To achieve the best possible performance, it'll try parsing with PHP's native function (which usually fails fast) and then falls back to JSON5.

Exceptions

This function will always throw a SyntaxError exception if parsing fails. This is a subclass of the new \JsonException introduced in PHP 7.3. Providing or omitting the JSON_THROW_ON_ERROR option will have no effect on this behavior.

For users on PHP 7.2 and below: a PHP 7.3 polyfill is included with this library so that you can safely reference \JsonException and JSON_THROW_ON_ERROR in your own code.

Binary / Executable

A binary/executable named json5 is also provided for converting JSON5 to plain JSON via your terminal.

Examples:

Converting a file named file.json5:

Converting a file and saving its output:

Converting from STDIN:

Converting from STDIN and saving the output:

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

Contributing

Please see CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Support

In addition to standard support, consider a Tidelift Subscription for professional support and get alerted when new releases or security issues come out.

Credits

License

The MIT License (MIT). Please see License File for more information.


Version
Requires php Version ^7.1.3|^8.0
ext-json Version *
ext-mbstring Version *

The package colinodell/json5 contains the following files

Loading the files please wait ....