Download the PHP package localheinz/json-normalizer without Composer

On this page you can find all versions of the php package localheinz/json-normalizer. 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?

Informations about the package json-normalizer

json-normalizer

Integrate Merge Release Renew Update

Code Coverage

Latest Stable Version Total Downloads Monthly Downloads

This project provides a composer package with generic and vendor-specific normalizers for normalizing JSON documents.

Installation

Run

Usage

This project comes with

Generic normalizers

This project comes with the following generic normalizers:

:bulb: All of these normalizers implement the Ergebnis\Json\Normalizer\Normalizer.

CallableNormalizer

When you want to normalize a JSON file with a callable, you can use the CallableNormalizer.

The normalized version will now have the callable applied to it.

ChainNormalizer

When you want to apply multiple normalizers in a chain, you can use the ChainNormalizer.

The normalized version will now contain the result of applying all normalizers in a chain, one after another.

:bulb: Be careful with the order of the normalizers, as one normalizer might override changes a previous normalizer applied.

FormatNormalizer

When you want to normalize a JSON file with a formatting, you can use the FormatNormalizer.

The normalized version will now have formatting applied according to $format.

IndentNormalizer

When you need to adjust the indentation of a JSON file, you can use the IndentNormalizer.

The normalized version will now be indented with 2 spaces.

JsonEncodeNormalizer

When you need to adjust the encoding of a JSON file, you can use the JsonEncodeNormalizer.

The normalized version will now be encoded with $jsonEncodeOptions.

:bulb: For reference, see json_encode() and the corresponding JSON constants.

SchemaNormalizer

When you want to rebuild a JSON file according to a JSON schema, you can use the SchemaNormalizer.

Let's assume the following schema

exists at /schema/example.json.

The normalized version will now be structured according to the JSON schema (in this simple case, properties will be reordered as found in the schema and additional properties will be ordered by name). Internally, the SchemaNormalizer uses justinrainbow/json-schema to resolve schemas, as well as to ensure (before and after normalization) that the JSON document is valid.

If you have properties that you do not want to be reordered, you can use a Pointer\Specification to specify which properties should not be reordered.

:bulb: For more information about JSON schema, visit json-schema.org.

WithFinalNewLineNormalizer

When you want to ensure that a JSON file has a single final new line, you can use the WithFinalNewLineNormalizer.

The normalized version will now have a single final new line.

WithoutFinalNewLineNormalizer

When you want to ensure that a JSON file does not have a final new line, you can use the WithoutFinalNewLineNormalizer.

The normalized version will now not have a final new line or any whitespace at the end.

Vendor-specific normalizers

This project comes with the following vendor-specific normalizers:

Vendor\Composer\ComposerJsonNormalizer

The Vendor\Composer\ComposerJsonNormalizer can be used to normalize a composer.json file according to its underlying JSON schema.

It composes the following normalizers:

Vendor\Composer\BinNormalizer

When composer.json contains an array of scripts in the bin section, the Vendor\Composer\BinNormalizer will sort the elements of the bin section by value in ascending order.

Vendor\Composer\ConfigHashNormalizer

When composer.json contains configuration in the config section, the Vendor\Composer\ConfigHashNormalizer will sort the content of these sections by key in ascending order.

The allow-plugins and preferred-install configuration options support keys with wildcards and require special handling.

When these keys do not use wildcards, then these keys are sorted in ascending order. When these keys use wildcards, these keys are sorted when the wildcards are at the end of package names. Due to internal implementation details of the wildcard feature within composer, sorting keys with wildcards in the middle is not feasible.

Vendor\Composer\PackageHashNormalizer

When composer.json contains any configuration in the

sections, the Vendor\Composer\PackageHashNormalizer will sort the packages in these sections.

:bulb: This transfers the behaviour from using the --sort-packages or sort-packages configuration flag in require and require-dev to other sections.

Vendor\Composer\RepositoriesHashNormalizer

When composer.json contains any configuration in the

section, the Vendor\Composer\RepositoriesHashNormalizer will sort the repositories listed in the exclude and only properties of repositories.

Vendor\Composer\VersionConstraintNormalizer

When composer.json contains version constraints in the

sections, the Vendor\Composer\VersionConstraintNormalizer will ensure that

Changelog

The maintainers of this project record notable changes to this project in a changelog.

Contributing

The maintainers of this project suggest following the contribution guide.

Code of Conduct

The maintainers of this project ask contributors to follow the code of conduct.

General Support Policy

The maintainers of this project provide limited support.

You can support the maintenance of this project by sponsoring @localheinz or requesting an invoice for services related to this project.

PHP Version Support Policy

This project supports PHP versions with active and security support.

The maintainers of this project add support for a PHP version following its initial release and drop support for a PHP version when it has reached the end of security support.

Security Policy

This project has a security policy.

License

This project uses the MIT license.

Credits

The algorithm for sorting packages in the composer/composer#3872.

Social

Follow @localheinz and @ergebnis on Twitter.


All versions of json-normalizer with dependencies

PHP Build Version
Package Version
Requires php Version ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0
ext-json Version *
ergebnis/json Version ^1.2.0
ergebnis/json-pointer Version ^3.4.0
ergebnis/json-printer Version ^3.5.0
ergebnis/json-schema-validator Version ^4.2.0
justinrainbow/json-schema Version ^5.2.12 || ^6.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package localheinz/json-normalizer contains the following files

Loading the files please wait ....