Download the PHP package deftek/json_pp without Composer

On this page you can find all versions of the php package deftek/json_pp. 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_pp

json_pp - JSON Pretty Printer

The json_pp utility prints JSON data in a legible, indented format. It provides the most benefit to people who need to read, inspect, and understand JSON data structures that are not already provided with separating white space, such as software developers building or consuming JSON-based APIs.

By default, json_pp does not escape slashes or multi-byte Unicode characters. These characters may be escaped by overriding the default encode options with a configuration file. Pretty-printing may be similarly disabled when compact JSON is needed and the source JSON is already formatted with white space.

System Requirements

Installation

To make json_pp available to all system users, which may require system administrator (e.g., root) privileges:

composer global install deftek/json_pp

To make json_pp available only for the current system user:

composer install deftek/json_pp

To include json_pp in a project that uses Composer:

composer require deftek/json_pp

To include json_pp for development purposes in a project that uses Composer:

composer require --dev deftek/json_pp

Usage

Pretty-print compact JSON contained in a string

echo '{"foo":{"bar":"baz"}}' | json_pp

Output:

{
    "foo": {
        "bar": "baz"
    }
}

Pretty-print compact JSON contained in a file:

json_pp < compact.json

Output compact JSON from pretty-printed source:

echo pretty.json | json_pp --config=config.compact.php

Where config.compact.php contains something like:

<?php
return [
    'decode' => 0,
    'depth'  => 512,
    'encode' => JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE,
];

Configuration

See config.default.php for the default configuration values, and override the values in your own configuration files as needed.

The configuration file contains three options that are used for controlling arguments to the json_decode() and json_encode() function calls:

  1. decode: This value represents the options argument for json_decode().
  2. depth: This value represents the depth argument for both json_decode() and json_encode().
  3. encode: This value represents the options argument for json_encode().

Copyright and License

The json_pp package is provided under the 3-Clause (aka New or Modified) BSD License. Complete copyright and license information is available in LICENSE.txt.

Issues and Contributing

Issues may be reported and contributions may be accepted within the contribution guidelines.

Change Log

Notable changes to json_pp are documented in the change log.


All versions of json_pp with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.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 deftek/json_pp contains the following files

Loading the files please wait ....